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
|
private boolean hasInvalidKeyDate(Object principal, GaenKey key) {
try {
this.validateRequest.getKeyDate(principal, key);
}
catch (InvalidDateException invalidDate) {
logger.error(invalidDate.getLocalizedMessage());
return true;
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hasInvalidKeyDate
File: dpppt-backend-sdk/dpppt-backend-sdk-ws/src/main/java/org/dpppt/backend/sdk/ws/controller/GaenController.java
Repository: RadarCOVID/radar-covid-backend-dp3t-server
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2020-26230
|
LOW
| 2.6
|
RadarCOVID/radar-covid-backend-dp3t-server
|
hasInvalidKeyDate
|
dpppt-backend-sdk/dpppt-backend-sdk-ws/src/main/java/org/dpppt/backend/sdk/ws/controller/GaenController.java
|
6d30c92cc8fcbde3ded7e9518853ef278080344d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public LogWatch watchLog() {
return watchLog(null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: watchLog
File: kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
Repository: fabric8io/kubernetes-client
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2021-20218
|
MEDIUM
| 5.8
|
fabric8io/kubernetes-client
|
watchLog
|
kubernetes-client/src/main/java/io/fabric8/kubernetes/client/dsl/internal/core/v1/PodOperationsImpl.java
|
325d67cc80b73f049a5d0cea4917c1f2709a8d86
| 0
|
Analyze the following code function for security vulnerabilities
|
private void attachLocationToConversation(Conversation conversation, Uri uri) {
if (conversation == null) {
return;
}
activity.xmppConnectionService.attachLocationToConversation(conversation, uri, new UiCallback<Message>() {
@Override
public void success(Message message) {
}
@Override
public void error(int errorCode, Message object) {
//TODO show possible pgp error
}
@Override
public void userInputRequried(PendingIntent pi, Message object) {
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: attachLocationToConversation
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
attachLocationToConversation
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void putInt(long address, int value) {
PlatformDependent0.putInt(address, value);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: putInt
File: common/src/main/java/io/netty/util/internal/PlatformDependent.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-668",
"CWE-378",
"CWE-379"
] |
CVE-2022-24823
|
LOW
| 1.9
|
netty
|
putInt
|
common/src/main/java/io/netty/util/internal/PlatformDependent.java
|
185f8b2756a36aaa4f973f1a2a025e7d981823f1
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<File> getRecordingsForPath(String id, List<File> recordings) {
List<File> recs = new ArrayList<>();
Iterator<File> iterator = recordings.iterator();
while (iterator.hasNext()) {
File rec = iterator.next();
if (rec.getName().startsWith(id)) {
recs.add(rec);
}
}
return recs;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRecordingsForPath
File: bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
Repository: bigbluebutton
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-12443
|
HIGH
| 7.5
|
bigbluebutton
|
getRecordingsForPath
|
bbb-common-web/src/main/java/org/bigbluebutton/api/RecordingService.java
|
b21ca8355a57286a1e6df96984b3a4c57679a463
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isUserMatch(int userId) {
if (mUsers.size() == 0) {
return true;
}
for (int i = 0; i < mUsers.size(); i++) {
if (mUsers.get(i) == userId) {
return true;
}
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUserMatch
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
|
isUserMatch
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateBoolean(@Positive int columnIndex, boolean x) throws SQLException {
updateValue(columnIndex, x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateBoolean
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateBoolean
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
void reportCurKeyguardUsageEventLocked() {
reportGlobalUsageEventLocked(mKeyguardShown
? UsageEvents.Event.KEYGUARD_SHOWN
: UsageEvents.Event.KEYGUARD_HIDDEN);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reportCurKeyguardUsageEventLocked
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
|
reportCurKeyguardUsageEventLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
962fb40991f15be4f688d960aa00073683ebdd20
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removePacketInterceptor(StanzaListener packetInterceptor) {
synchronized (interceptors) {
interceptors.remove(packetInterceptor);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removePacketInterceptor
File: smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
removePacketInterceptor
|
smack-core/src/main/java/org/jivesoftware/smack/AbstractXMPPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
private Set<BlobIdent> getPickerState(@Nullable ObjectId commitId, BlobIdent currentBlobIdent,
@Nullable Set<String> expandedPaths) {
Set<BlobIdent> pickerState = new HashSet<>();
if (commitId != null) {
if (expandedPaths != null) {
for (String path: expandedPaths)
pickerState.add(new BlobIdent(commitId.name(), path, FileMode.TREE.getBits()));
}
String parentPath;
if (currentBlobIdent.isTree())
parentPath = currentBlobIdent.path;
else if (currentBlobIdent.path.contains("/"))
parentPath = StringUtils.substringBeforeLast(currentBlobIdent.path, "/");
else
parentPath = null;
while (parentPath != null) {
pickerState.add(new BlobIdent(commitId.name(), parentPath, FileMode.TYPE_TREE));
if (parentPath.contains("/"))
parentPath = StringUtils.substringBeforeLast(parentPath, "/");
else
parentPath = null;
}
}
return pickerState;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPickerState
File: server-core/src/main/java/io/onedev/server/web/component/markdown/InsertUrlPanel.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-434"
] |
CVE-2021-21245
|
HIGH
| 7.5
|
theonedev/onedev
|
getPickerState
|
server-core/src/main/java/io/onedev/server/web/component/markdown/InsertUrlPanel.java
|
0c060153fb97c0288a1917efdb17cc426934dacb
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean configureDescriptor(StaplerRequest req, JSONObject json, Descriptor<?> d) throws FormException {
// collapse the structure to remain backward compatible with the JSON structure before 1.
String name = d.getJsonSafeClassName();
JSONObject js = json.has(name) ? json.getJSONObject(name) : new JSONObject(); // if it doesn't have the property, the method returns invalid null object.
json.putAll(js);
return d.configure(req, js);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: configureDescriptor
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
|
configureDescriptor
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void reset() {
deselectAll();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: reset
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
|
reset
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCustomFieldsValuesString(List<CustomFieldDao> customFields) {
List fields = new ArrayList();
customFields.forEach(item -> {
Map<String, Object> field = new LinkedHashMap<>();
field.put("customData", item.getCustomData());
field.put("id", item.getId());
field.put("name", item.getName());
field.put("type", item.getType());
String defaultValue = item.getDefaultValue();
if (StringUtils.isNotBlank(defaultValue)) {
field.put("value", JSON.parseObject(defaultValue));
}
fields.add(field);
});
return JSON.toJSONString(fields);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCustomFieldsValuesString
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getCustomFieldsValuesString
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onGuildVoiceJoin(@Nonnull GuildVoiceJoinEvent event) {
super.onGuildVoiceJoin(event);
if (!ArrayUtil.voiceJoined.containsKey(event.getMember().getUser())) {
ArrayUtil.voiceJoined.put(event.getMember().getUser(), System.currentTimeMillis());
}
SQLResponse sqlResponse = Main.getInstance().getSqlConnector().getSqlWorker().getEntity(TemporalVoicechannel.class, "SELECT * FROM TemporalVoicechannel WHERE GID = ? AND VID = ?", event.getGuild().getId(), event.getChannelJoined().getId());
if (sqlResponse.isSuccess()) {
VoiceChannel voiceChannel = event.getGuild().getVoiceChannelById(event.getChannelJoined().getId());
if (voiceChannel == null)
return;
if (!((TemporalVoicechannel) sqlResponse.getEntity()).getVoiceChannelId().equalsIgnoreCase(voiceChannel.getId())) {
return;
}
if (voiceChannel.getParentCategory() != null) {
voiceChannel.getParentCategory().createVoiceChannel("Temporal VC #" +
event.getGuild().getVoiceChannels().stream().filter(c -> c.getName().startsWith("Temporal VC")).toList().size() + 1).queue(channel -> {
event.getGuild().moveVoiceMember(event.getMember(), channel).queue();
ArrayUtil.temporalVoicechannel.add(channel.getId());
});
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onGuildVoiceJoin
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
|
onGuildVoiceJoin
|
src/main/java/de/presti/ree6/events/OtherEvents.java
|
459b5bc24f0ea27e50031f563373926e94b9aa0a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeByGroupId(long groupId) {
for (KBTemplate kbTemplate : findByGroupId(groupId, QueryUtil.ALL_POS,
QueryUtil.ALL_POS, null)) {
remove(kbTemplate);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeByGroupId
File: modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
Repository: brianchandotcom/liferay-portal
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2017-12647
|
MEDIUM
| 4.3
|
brianchandotcom/liferay-portal
|
removeByGroupId
|
modules/apps/knowledge-base/knowledge-base-service/src/main/java/com/liferay/knowledge/base/service/persistence/impl/KBTemplatePersistenceImpl.java
|
ef93d984be9d4d478a5c4b1ca9a86f4e80174774
| 0
|
Analyze the following code function for security vulnerabilities
|
protected static PdfObject duplicatePdfObject(PdfObject original, PdfReader newReader) {
if (original == null)
return null;
switch (original.type()) {
case PdfObject.DICTIONARY: {
return duplicatePdfDictionary((PdfDictionary)original, null, newReader);
}
case PdfObject.STREAM: {
PRStream org = (PRStream)original;
PRStream stream = new PRStream(org, null, newReader);
duplicatePdfDictionary(org, stream, newReader);
return stream;
}
case PdfObject.ARRAY: {
PdfArray arr = new PdfArray();
for (Iterator it = ((PdfArray)original).listIterator(); it.hasNext();) {
arr.add(duplicatePdfObject((PdfObject)it.next(), newReader));
}
return arr;
}
case PdfObject.INDIRECT: {
PRIndirectReference org = (PRIndirectReference)original;
return new PRIndirectReference(newReader, org.getNumber(), org.getGeneration());
}
default:
return original;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: duplicatePdfObject
File: java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
Repository: pdftk-java/pdftk
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2021-37819
|
HIGH
| 7.5
|
pdftk-java/pdftk
|
duplicatePdfObject
|
java/com/gitlab/pdftk_java/com/lowagie/text/pdf/PdfReader.java
|
9b0cbb76c8434a8505f02ada02a94263dcae9247
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Nullable
public PersistableBundle getTransferOwnershipBundle() {
final CallerIdentity caller = getCallerIdentity();
Preconditions.checkCallAuthorization(
isProfileOwner(caller) || isDefaultDeviceOwner(caller));
synchronized (getLockObject()) {
final int callingUserId = caller.getUserId();
final File bundleFile = new File(
mPathProvider.getUserSystemDirectory(callingUserId),
TRANSFER_OWNERSHIP_PARAMETERS_XML);
if (!bundleFile.exists()) {
return null;
}
try (FileInputStream stream = new FileInputStream(bundleFile)) {
TypedXmlPullParser parser = Xml.resolvePullParser(stream);
parser.next();
return PersistableBundle.restoreFromXml(parser);
} catch (IOException | XmlPullParserException | IllegalArgumentException e) {
Slogf.e(LOG_TAG, "Caught exception while trying to load the "
+ "owner transfer parameters from file " + bundleFile, e);
return null;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTransferOwnershipBundle
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
|
getTransferOwnershipBundle
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setStrictErrorChecking(boolean strictErrorChecking) {
doc.setStrictErrorChecking(strictErrorChecking);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setStrictErrorChecking
File: HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
Repository: LoboEvolution
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000540
|
MEDIUM
| 6.8
|
LoboEvolution
|
setStrictErrorChecking
|
HTML_Renderer/src/main/java/org/loboevolution/html/js/xml/XMLDocument.java
|
9b75694cedfa4825d4a2330abf2719d470c654cd
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int getNonDecorDisplayWidth(int fullWidth, int fullHeight, int rotation) {
if (mHasNavigationBar) {
// For a basic navigation bar, when we are in landscape mode we place
// the navigation bar to the side.
if (mNavigationBarCanMove && fullWidth > fullHeight) {
return fullWidth - mNavigationBarWidthForRotation[rotation];
}
}
return fullWidth;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNonDecorDisplayWidth
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
|
getNonDecorDisplayWidth
|
policy/src/com/android/internal/policy/impl/PhoneWindowManager.java
|
84669ca8de55d38073a0dcb01074233b0a417541
| 0
|
Analyze the following code function for security vulnerabilities
|
private String trim(final Optional<String> text) {
return (text == null || !text.isPresent())? null : text.get().trim();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: trim
File: opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
Repository: OpenNMS/opennms
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25931
|
MEDIUM
| 6.8
|
OpenNMS/opennms
|
trim
|
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
|
607151ea8f90212a3fb37c977fa57c7d58d26a84
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean dumpWindows(PrintWriter pw, String name, String[] args,
int opti, boolean dumpAll) {
WindowList windows = new WindowList();
if ("visible".equals(name)) {
synchronized(mWindowMap) {
final int numDisplays = mDisplayContents.size();
for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
final WindowList windowList =
mDisplayContents.valueAt(displayNdx).getWindowList();
for (int winNdx = windowList.size() - 1; winNdx >= 0; --winNdx) {
final WindowState w = windowList.get(winNdx);
if (w.mWinAnimator.mSurfaceShown) {
windows.add(w);
}
}
}
}
} else {
int objectId = 0;
// See if this is an object ID.
try {
objectId = Integer.parseInt(name, 16);
name = null;
} catch (RuntimeException e) {
}
synchronized(mWindowMap) {
final int numDisplays = mDisplayContents.size();
for (int displayNdx = 0; displayNdx < numDisplays; ++displayNdx) {
final WindowList windowList =
mDisplayContents.valueAt(displayNdx).getWindowList();
for (int winNdx = windowList.size() - 1; winNdx >= 0; --winNdx) {
final WindowState w = windowList.get(winNdx);
if (name != null) {
if (w.mAttrs.getTitle().toString().contains(name)) {
windows.add(w);
}
} else if (System.identityHashCode(w) == objectId) {
windows.add(w);
}
}
}
}
}
if (windows.size() <= 0) {
return false;
}
synchronized(mWindowMap) {
dumpWindowsLocked(pw, dumpAll, windows);
}
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpWindows
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
dumpWindows
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
public static File createTempDir(String eTag, String type) throws IOException {
File tmpDir = FileUtils.getTempDirectory();
File modelDir = new File(tmpDir, type);
if (eTag == null) {
eTag = UUID.randomUUID().toString().replaceAll("-", "");
}
File dir = new File(modelDir, eTag);
if (dir.exists()) {
FileUtils.forceDelete(dir);
}
FileUtils.forceMkdir(dir);
return dir;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: createTempDir
File: frontend/archive/src/main/java/org/pytorch/serve/archive/utils/ZipUtils.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-48299
|
MEDIUM
| 5.3
|
pytorch/serve
|
createTempDir
|
frontend/archive/src/main/java/org/pytorch/serve/archive/utils/ZipUtils.java
|
bfb3d42396727614aef625143b4381e64142f9bb
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String trimFilename(String str, int maxBytes) {
final StringBuilder res = new StringBuilder(str);
trimFilename(res, maxBytes);
return res.toString();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: trimFilename
File: src/com/android/providers/media/util/FileUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2023-35670
|
HIGH
| 7.8
|
android
|
trimFilename
|
src/com/android/providers/media/util/FileUtils.java
|
db3c69afcb0a45c8aa2f333fcde36217889899fe
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getAssignedLabelString() {
if (canRoam || assignedNode==null) return null;
try {
LabelExpression.parseExpression(assignedNode);
return assignedNode;
} catch (ANTLRException e) {
// must be old label or host name that includes whitespace or other unsafe chars
return LabelAtom.escape(assignedNode);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAssignedLabelString
File: core/src/main/java/hudson/model/AbstractProject.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2013-7330
|
MEDIUM
| 4
|
jenkinsci/jenkins
|
getAssignedLabelString
|
core/src/main/java/hudson/model/AbstractProject.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
protected JsonSerializer<Object> findConvertingSerializer(SerializerProvider provider,
BeanPropertyWriter prop)
throws JsonMappingException
{
final AnnotationIntrospector intr = provider.getAnnotationIntrospector();
if (intr != null) {
AnnotatedMember m = prop.getMember();
if (m != null) {
Object convDef = intr.findSerializationConverter(m);
if (convDef != null) {
Converter<Object,Object> conv = provider.converterInstance(prop.getMember(), convDef);
JavaType delegateType = conv.getOutputType(provider.getTypeFactory());
// [databind#731]: Should skip if nominally java.lang.Object
JsonSerializer<?> ser = delegateType.isJavaLangObject() ? null
: provider.findValueSerializer(delegateType, prop);
return new StdDelegatingSerializer(conv, delegateType, ser);
}
}
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findConvertingSerializer
File: src/main/java/com/fasterxml/jackson/databind/ser/std/BeanSerializerBase.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
findConvertingSerializer
|
src/main/java/com/fasterxml/jackson/databind/ser/std/BeanSerializerBase.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
private static boolean isUpdatedSystemApp(PackageSetting ps) {
return (ps.pkgFlags & ApplicationInfo.FLAG_UPDATED_SYSTEM_APP) != 0;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isUpdatedSystemApp
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
|
isUpdatedSystemApp
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private AtomicFile getBaseStateFile() {
final File path = new File(injectSystemDataPath(), FILENAME_BASE_STATE);
path.mkdirs();
return new AtomicFile(path);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getBaseStateFile
File: services/core/java/com/android/server/pm/ShortcutService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40092
|
MEDIUM
| 5.5
|
android
|
getBaseStateFile
|
services/core/java/com/android/server/pm/ShortcutService.java
|
a5e55363e69b3c84d3f4011c7b428edb1a25752c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
@InlineMe(
replacement = "Files.asCharSource(file, charset).read()",
imports = "com.google.common.io.Files")
public static String toString(File file, Charset charset) throws IOException {
return asCharSource(file, charset).read();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: toString
File: android/guava/src/com/google/common/io/Files.java
Repository: google/guava
The code follows secure coding practices.
|
[
"CWE-552"
] |
CVE-2023-2976
|
HIGH
| 7.1
|
google/guava
|
toString
|
android/guava/src/com/google/common/io/Files.java
|
feb83a1c8fd2e7670b244d5afd23cba5aca43284
| 0
|
Analyze the following code function for security vulnerabilities
|
private void copyUnknownFiles(ZipOutputStream outputFile, Map<String, String> files)
throws BrutException, IOException {
File unknownFileDir = new File(mApkDir, UNK_DIRNAME);
// loop through unknown files
for (Map.Entry<String,String> unknownFileInfo : files.entrySet()) {
File inputFile;
try {
inputFile = new File(unknownFileDir, BrutIO.sanitizeUnknownFile(unknownFileDir, unknownFileInfo.getKey()));
} catch (RootUnknownFileException | InvalidUnknownFileException | TraversalUnknownFileException exception) {
LOGGER.warning(String.format("Skipping file %s (%s)", unknownFileInfo.getKey(), exception.getMessage()));
continue;
}
if (inputFile.isDirectory()) {
continue;
}
ZipEntry newEntry = new ZipEntry(unknownFileInfo.getKey());
int method = Integer.parseInt(unknownFileInfo.getValue());
LOGGER.fine(String.format("Copying unknown file %s with method %d", unknownFileInfo.getKey(), method));
if (method == ZipEntry.STORED) {
newEntry.setMethod(ZipEntry.STORED);
newEntry.setSize(inputFile.length());
newEntry.setCompressedSize(-1);
BufferedInputStream unknownFile = new BufferedInputStream(Files.newInputStream(inputFile.toPath()));
CRC32 crc = BrutIO.calculateCrc(unknownFile);
newEntry.setCrc(crc.getValue());
unknownFile.close();
} else {
newEntry.setMethod(ZipEntry.DEFLATED);
}
outputFile.putNextEntry(newEntry);
BrutIO.copy(inputFile, outputFile);
outputFile.closeEntry();
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2024-21633
- Severity: HIGH
- CVSS Score: 7.8
Description: Prevent arbitrary file writes with malicious resource names. (#3484)
* refactor: rename sanitize function
* fix: expose getDir
* fix: safe handling of untrusted resource names
- fixes: GHSA-2hqv-2xv4-5h5w
* test: sample file for GHSA-2hqv-2xv4-5h5w
* refactor: avoid detection of absolute files for resource check
* chore: enable info mode on gradle
* test: skip test on windows
* chore: debug windows handling
* fix: normalize entry with file separators
* fix: normalize filepath after cleansing
* chore: Android paths are not OS specific
* refactor: use java.nio for path traversal checking
* chore: align path separator on Windows for Zip files
* chore: rework towards basic directory traversal
* chore: remove '--info' on build.yml
Function: copyUnknownFiles
File: brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java
Repository: iBotPeaches/Apktool
Fixed Code:
private void copyUnknownFiles(ZipOutputStream outputFile, Map<String, String> files)
throws BrutException, IOException {
File unknownFileDir = new File(mApkDir, UNK_DIRNAME);
// loop through unknown files
for (Map.Entry<String,String> unknownFileInfo : files.entrySet()) {
File inputFile;
try {
inputFile = new File(unknownFileDir, BrutIO.sanitizeFilepath(unknownFileDir, unknownFileInfo.getKey()));
} catch (RootUnknownFileException | InvalidUnknownFileException | TraversalUnknownFileException exception) {
LOGGER.warning(String.format("Skipping file %s (%s)", unknownFileInfo.getKey(), exception.getMessage()));
continue;
}
if (inputFile.isDirectory()) {
continue;
}
ZipEntry newEntry = new ZipEntry(unknownFileInfo.getKey());
int method = Integer.parseInt(unknownFileInfo.getValue());
LOGGER.fine(String.format("Copying unknown file %s with method %d", unknownFileInfo.getKey(), method));
if (method == ZipEntry.STORED) {
newEntry.setMethod(ZipEntry.STORED);
newEntry.setSize(inputFile.length());
newEntry.setCompressedSize(-1);
BufferedInputStream unknownFile = new BufferedInputStream(Files.newInputStream(inputFile.toPath()));
CRC32 crc = BrutIO.calculateCrc(unknownFile);
newEntry.setCrc(crc.getValue());
unknownFile.close();
} else {
newEntry.setMethod(ZipEntry.DEFLATED);
}
outputFile.putNextEntry(newEntry);
BrutIO.copy(inputFile, outputFile);
outputFile.closeEntry();
}
}
|
[
"CWE-22"
] |
CVE-2024-21633
|
HIGH
| 7.8
|
iBotPeaches/Apktool
|
copyUnknownFiles
|
brut.apktool/apktool-lib/src/main/java/brut/androlib/ApkBuilder.java
|
d348c43b24a9de350ff6e5bd610545a10c1fc712
| 1
|
Analyze the following code function for security vulnerabilities
|
private boolean isManagedProfileOwner(CallerIdentity caller) {
return isProfileOwner(caller) && isManagedProfile(caller.getUserId());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isManagedProfileOwner
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
|
isManagedProfileOwner
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isStrict() {
return strict;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isStrict
File: core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
Repository: AdoptOpenJDK/IcedTea-Web
The code follows secure coding practices.
|
[
"CWE-345",
"CWE-94",
"CWE-22"
] |
CVE-2019-10182
|
MEDIUM
| 5.8
|
AdoptOpenJDK/IcedTea-Web
|
isStrict
|
core/src/main/java/net/sourceforge/jnlp/runtime/JNLPClassLoader.java
|
e0818f521a0711aeec4b913b49b5fc6a52815662
| 0
|
Analyze the following code function for security vulnerabilities
|
public abstract JavaType withContentValueHandler(Object h);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: withContentValueHandler
File: src/main/java/com/fasterxml/jackson/databind/JavaType.java
Repository: FasterXML/jackson-databind
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2019-16942
|
HIGH
| 7.5
|
FasterXML/jackson-databind
|
withContentValueHandler
|
src/main/java/com/fasterxml/jackson/databind/JavaType.java
|
54aa38d87dcffa5ccc23e64922e9536c82c1b9c8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ActivityTokens getAttachedNonFinishingActivityForTask(int taskId,
IBinder token) {
synchronized (mGlobalLock) {
final Task task = mRootWindowContainer.anyTaskForId(taskId,
MATCH_ATTACHED_TASK_ONLY);
if (task == null) {
Slog.w(TAG, "getApplicationThreadForTopActivity failed:"
+ " Requested task not found");
return null;
}
final List<ActivityRecord> list = new ArrayList<>();
task.forAllActivities(r -> {
if (!r.finishing) {
list.add(r);
}
});
if (list.size() <= 0) {
return null;
}
// pass null, get top Activity
if (token == null && list.get(0).attachedToProcess()) {
ActivityRecord topRecord = list.get(0);
return new ActivityTokens(topRecord.token, topRecord.assistToken,
topRecord.app.getThread(), topRecord.shareableActivityToken,
topRecord.getUid());
}
// find the expected Activity
for (int i = 0; i < list.size(); i++) {
ActivityRecord record = list.get(i);
if (record.shareableActivityToken == token && record.attachedToProcess()) {
return new ActivityTokens(record.token, record.assistToken,
record.app.getThread(), record.shareableActivityToken,
record.getUid());
}
}
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAttachedNonFinishingActivityForTask
File: services/core/java/com/android/server/wm/ActivityTaskManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-40094
|
HIGH
| 7.8
|
android
|
getAttachedNonFinishingActivityForTask
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected int handleResponse(final EasResponse response) throws
IOException, CommandStatusException {
// resp is either an authentication error, or a good response.
final int code = response.getStatus();
if (response.isRedirectError()) {
final String loc = response.getRedirectAddress();
if (loc != null && loc.startsWith("http")) {
LogUtils.d(TAG, "Posting autodiscover to redirect: " + loc);
mRedirectUri = loc;
return RESULT_REDIRECT;
} else {
LogUtils.w(TAG, "Invalid redirect %s", loc);
return RESULT_FATAL_SERVER_ERROR;
}
}
if (code == HttpStatus.SC_UNAUTHORIZED) {
LogUtils.w(TAG, "Autodiscover received SC_UNAUTHORIZED");
return RESULT_SC_UNAUTHORIZED;
} else if (code != HttpStatus.SC_OK) {
// We'll try the next address if this doesn't work
LogUtils.d(TAG, "Bad response code when posting autodiscover: %d", code);
return RESULT_BAD_RESPONSE;
} else {
mHostAuth = parseAutodiscover(response);
if (mHostAuth != null) {
// Fill in the rest of the HostAuth
// We use the user name and password that were successful during
// the autodiscover process
mHostAuth.mLogin = mUsername;
mHostAuth.mPassword = mPassword;
// Note: there is no way we can auto-discover the proper client
// SSL certificate to use, if one is needed.
mHostAuth.mPort = 443;
mHostAuth.mProtocol = Eas.PROTOCOL;
mHostAuth.mFlags = HostAuth.FLAG_SSL | HostAuth.FLAG_AUTHENTICATE;
return RESULT_OK;
} else {
return RESULT_HARD_DATA_FAILURE;
}
}
}
|
Vulnerability Classification:
- CWE: CWE-200
- CVE: CVE-2016-2415
- Severity: HIGH
- CVSS Score: 7.1
Description: Patch Exchange Autodiscover Code for Security Issue
The change removes the unauthenticated GET fallback attempt for the
Autodiscover process. Given that the Autodiscover code is functionally broken
and this fallback attempt wouldn't succeed unless an attacker faked a success
response, a good way to patch the security issue is to disable the attempt.
The change also updates the request content type, disables automatic
redirects, and allows for parsing namespaces to help the first two attempts
succeed. As this is not meant to be a functional patch but a security patch,
there are no further changes to the Autodiscover code.
BUG: 26488455
Change-Id: I0fc93c95e755c8fa60e94da5bec4b3b4c49cdfc1
Function: handleResponse
File: src/com/android/exchange/eas/EasAutoDiscover.java
Repository: android
Fixed Code:
@Override
protected int handleResponse(final EasResponse response) throws
IOException, CommandStatusException {
// resp is either an authentication error, or a good response.
final int code = response.getStatus();
if (response.isRedirectError()) {
final Uri loc = response.getRedirectUri();
if (loc != null && HTTPS_SCHEME.equalsIgnoreCase(loc.getScheme())) {
mRedirectUri = loc.toString();
LogUtils.d(TAG, "Posting autodiscover to redirect: " + mRedirectUri);
return RESULT_REDIRECT;
} else {
LogUtils.w(TAG, "Invalid redirect %s", loc);
return RESULT_FATAL_SERVER_ERROR;
}
}
if (code == HttpStatus.SC_UNAUTHORIZED) {
LogUtils.w(TAG, "Autodiscover received SC_UNAUTHORIZED");
return RESULT_SC_UNAUTHORIZED;
} else if (code != HttpStatus.SC_OK) {
// We'll try the next address if this doesn't work
LogUtils.d(TAG, "Bad response code when posting autodiscover: %d", code);
return RESULT_BAD_RESPONSE;
} else {
mHostAuth = parseAutodiscover(response);
if (mHostAuth != null) {
// Fill in the rest of the HostAuth
// We use the user name and password that were successful during
// the autodiscover process
mHostAuth.mLogin = mUsername;
mHostAuth.mPassword = mPassword;
// Note: there is no way we can auto-discover the proper client
// SSL certificate to use, if one is needed.
mHostAuth.mPort = 443;
mHostAuth.mProtocol = Eas.PROTOCOL;
mHostAuth.mFlags = HostAuth.FLAG_SSL | HostAuth.FLAG_AUTHENTICATE;
return RESULT_OK;
} else {
return RESULT_HARD_DATA_FAILURE;
}
}
}
|
[
"CWE-200"
] |
CVE-2016-2415
|
HIGH
| 7.1
|
android
|
handleResponse
|
src/com/android/exchange/eas/EasAutoDiscover.java
|
0d1a38b1755efe7ed4e8d7302a24186616bba9b2
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void pause(String packageName) {
mSessionCb.pause(packageName, Binder.getCallingPid(), Binder.getCallingUid());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: pause
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
|
pause
|
services/core/java/com/android/server/media/MediaSessionRecord.java
|
06e772e05514af4aa427641784c5eec39a892ed3
| 0
|
Analyze the following code function for security vulnerabilities
|
public TrustKeyManager getKeyManager() {
return this.keyManager;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKeyManager
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
getKeyManager
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
public void exitFullscreen() {
if (mNativeContentViewCore != 0) nativeExitFullscreen(mNativeContentViewCore);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: exitFullscreen
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
exitFullscreen
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate48(File dataDir, Stack<Integer> versions) {
for (File file: dataDir.listFiles()) {
try {
String content = FileUtils.readFileToString(file, StandardCharsets.UTF_8);
content = StringUtils.replace(content,
"\" is before \"", "\" is until \"");
content = StringUtils.replace(content,
"\" is after \"", "\" is since \"");
FileUtils.writeStringToFile(file, content, StandardCharsets.UTF_8);
} catch (IOException e) {
throw new RuntimeException(e);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: migrate48
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate48
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateNClob(String columnName, @Nullable NClob nClob) throws SQLException {
updateNClob(findColumn(columnName), nClob);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateNClob
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateNClob
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setRights(EntityReference entityReference, String groups, String users, String rights, boolean enabled)
{
setRights(entityReference, "XWiki.XWikiRights", groups, users, rights, enabled);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setRights
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
setRights
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
public void keyguardGoingAway() {
// Treat Keyguard exit animation as an app transition to achieve nice transition for status
// bar.
mKeyguardGoingAway = true;
mKeyguardMonitor.notifyKeyguardGoingAway(true);
mCommandQueue.appTransitionPending(true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: keyguardGoingAway
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
keyguardGoingAway
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated(since = "12.5RC1")
public void rename(DocumentReference newDocumentReference, XWikiContext context) throws XWikiException
{
rename(newDocumentReference, getBackLinkedReferences(context), context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rename
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-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
rename
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public PartialResponseWriter getPartialResponseWriter() {
assertNotReleased();
if (partialResponseWriter == null) {
partialResponseWriter = new DelayedInitPartialResponseWriter(this);
}
return partialResponseWriter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPartialResponseWriter
File: impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
Repository: eclipse-ee4j/mojarra
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2019-17091
|
MEDIUM
| 4.3
|
eclipse-ee4j/mojarra
|
getPartialResponseWriter
|
impl/src/main/java/com/sun/faces/context/PartialViewContextImpl.java
|
a3fa9573789ed5e867c43ea38374f4dbd5a8f81f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static String getStack(final boolean printLine) {
StackTraceElement[] stackTrace = new Throwable().getStackTrace();
return getStack(stackTrace, printLine);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStack
File: library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
Repository: lingochamp/FileDownloader
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2018-11248
|
HIGH
| 7.5
|
lingochamp/FileDownloader
|
getStack
|
library/src/main/java/com/liulishuo/filedownloader/util/FileDownloadUtils.java
|
b023cc081bbecdd2a9f3549a3ae5c12a9647ed7f
| 0
|
Analyze the following code function for security vulnerabilities
|
public static List<Field> getFilesFieldsList(Structure structure, List<String> parametersName, List<String[]> values){
List<Field> fileList = new ArrayList<Field>();
for(int i=0; i < parametersName.size(); i++){
String fieldname = parametersName.get(i);
String[] fieldValue = values.get(i);
Field field = structure.getFieldVar(fieldname);
if(UtilMethods.isSet(field) && APILocator.getFieldAPI().valueSettable(field)){
if(field.getFieldType().equals(Field.FieldType.FILE.toString()) && UtilMethods.isSet(fieldValue)){
fileList.add(field);
}
}
}
return fileList;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getFilesFieldsList
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
|
getFilesFieldsList
|
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
public int getNettyThreads() {
return getIntProperty(TS_NUMBER_OF_NETTY_THREADS, 0);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNettyThreads
File: frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
Repository: pytorch/serve
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2023-43654
|
CRITICAL
| 9.8
|
pytorch/serve
|
getNettyThreads
|
frontend/server/src/main/java/org/pytorch/serve/util/ConfigManager.java
|
391bdec3348e30de173fbb7c7277970e0b53c8ad
| 0
|
Analyze the following code function for security vulnerabilities
|
protected GetMethod executeGet(String uri, boolean release, int... expectedCodes) throws Exception
{
return assertStatusCodes(executeGet(uri), release, expectedCodes);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeGet
File: xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2023-35166
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
executeGet
|
xwiki-platform-core/xwiki-platform-test/xwiki-platform-test-ui/src/main/java/org/xwiki/test/ui/TestUtils.java
|
98208c5bb1e8cdf3ff1ac35d8b3d1cb3c28b3263
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPerform(CommandEvent commandEvent) {
if (commandEvent.getMember().hasPermission(Permission.ADMINISTRATOR) && commandEvent.getMember().hasPermission(Permission.MANAGE_SERVER)) {
EmbedBuilder embedBuilder = new EmbedBuilder()
.setTitle("Setup Menu")
.setFooter(commandEvent.getGuild().getName() + " - " + Data.ADVERTISEMENT, commandEvent.getGuild().getIconUrl())
.setColor(Color.cyan)
.setDescription("Which configuration do you want to check out?");
List<SelectOption> optionList = new ArrayList<>();
optionList.add(SelectOption.of("Audit-Logging", "log"));
optionList.add(SelectOption.of("Welcome-channel", "welcome"));
optionList.add(SelectOption.of("News-channel", "news"));
optionList.add(SelectOption.of("Autorole", "autorole"));
optionList.add(SelectOption.of("Temporal-Voice", "tempvoice"));
optionList.add(SelectOption.of("Statistics", "statistics"));
SelectMenu selectMenu = new SelectMenuImpl("setupActionMenu", "Select a configuration Step!", 1, 1, false, optionList);
if (commandEvent.isSlashCommand()) {
commandEvent.getInteractionHook().sendMessageEmbeds(embedBuilder.build())
.addActionRow(selectMenu).queue();
} else {
commandEvent.getChannel().sendMessageEmbeds(embedBuilder.build())
.addActionRow(selectMenu).queue();
}
} else {
Main.getInstance().getCommandManager().sendMessage("You dont have the Permission for this Command!", 5, commandEvent.getChannel(), commandEvent.getInteractionHook());
}
Main.getInstance().getCommandManager().deleteMessage(commandEvent.getMessage(), commandEvent.getInteractionHook());
}
|
Vulnerability Classification:
- CWE: CWE-863
- CVE: CVE-2022-39302
- Severity: MEDIUM
- CVSS Score: 5.4
Description: Removed News-Channel.
Fixed Cross-Server Channel Exploit.
Fixed Temporal-Voice setup.
Function: onPerform
File: src/main/java/de/presti/ree6/commands/impl/mod/Setup.java
Repository: Ree6-Applications/Ree6
Fixed Code:
@Override
public void onPerform(CommandEvent commandEvent) {
if (commandEvent.getMember().hasPermission(Permission.ADMINISTRATOR) && commandEvent.getMember().hasPermission(Permission.MANAGE_SERVER)) {
EmbedBuilder embedBuilder = new EmbedBuilder()
.setTitle("Setup Menu")
.setFooter(commandEvent.getGuild().getName() + " - " + Data.ADVERTISEMENT, commandEvent.getGuild().getIconUrl())
.setColor(Color.cyan)
.setDescription("Which configuration do you want to check out?");
List<SelectOption> optionList = new ArrayList<>();
optionList.add(SelectOption.of("Audit-Logging", "log"));
optionList.add(SelectOption.of("Welcome-channel", "welcome"));
optionList.add(SelectOption.of("Autorole", "autorole"));
optionList.add(SelectOption.of("Temporal-Voice", "tempvoice"));
optionList.add(SelectOption.of("Statistics", "statistics"));
SelectMenu selectMenu = new SelectMenuImpl("setupActionMenu", "Select a configuration Step!", 1, 1, false, optionList);
if (commandEvent.isSlashCommand()) {
commandEvent.getInteractionHook().sendMessageEmbeds(embedBuilder.build())
.addActionRow(selectMenu).queue();
} else {
commandEvent.getChannel().sendMessageEmbeds(embedBuilder.build())
.addActionRow(selectMenu).queue();
}
} else {
Main.getInstance().getCommandManager().sendMessage("You dont have the Permission for this Command!", 5, commandEvent.getChannel(), commandEvent.getInteractionHook());
}
Main.getInstance().getCommandManager().deleteMessage(commandEvent.getMessage(), commandEvent.getInteractionHook());
}
|
[
"CWE-863"
] |
CVE-2022-39302
|
MEDIUM
| 5.4
|
Ree6-Applications/Ree6
|
onPerform
|
src/main/java/de/presti/ree6/commands/impl/mod/Setup.java
|
459b5bc24f0ea27e50031f563373926e94b9aa0a
| 1
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateBinaryStream(@Positive int columnIndex,
java.io.@Nullable InputStream x, int length)
throws SQLException {
if (x == null) {
updateNull(columnIndex);
return;
}
byte[] data = new byte[length];
int numRead = 0;
try {
while (true) {
int n = x.read(data, numRead, length - numRead);
if (n == -1) {
break;
}
numRead += n;
if (numRead == length) {
break;
}
}
} catch (IOException ie) {
throw new PSQLException(GT.tr("Provided InputStream failed."), null, ie);
}
if (numRead == length) {
updateBytes(columnIndex, data);
} else {
// the stream contained less data than they said
// perhaps this is an error?
byte[] data2 = new byte[numRead];
System.arraycopy(data, 0, data2, 0, numRead);
updateBytes(columnIndex, data2);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateBinaryStream
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateBinaryStream
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isIgnorePermissions() {
return ignorePermissions;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isIgnorePermissions
File: src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
Repository: codehaus-plexus/plexus-archiver
The code follows secure coding practices.
|
[
"CWE-22",
"CWE-61"
] |
CVE-2023-37460
|
CRITICAL
| 9.8
|
codehaus-plexus/plexus-archiver
|
isIgnorePermissions
|
src/main/java/org/codehaus/plexus/archiver/AbstractUnArchiver.java
|
54759839fbdf85caf8442076f001d5fd64e0dcb2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setDeferIndexingForCodesystemsOfSize(int theDeferIndexingForCodesystemsOfSize) {
myDeferIndexingForCodesystemsOfSize = theDeferIndexingForCodesystemsOfSize;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDeferIndexingForCodesystemsOfSize
File: hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
Repository: hapifhir/hapi-fhir
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2021-32053
|
MEDIUM
| 5
|
hapifhir/hapi-fhir
|
setDeferIndexingForCodesystemsOfSize
|
hapi-fhir-jpaserver-api/src/main/java/ca/uhn/fhir/jpa/api/config/DaoConfig.java
|
f2934b229c491235ab0e7782dea86b324521082a
| 0
|
Analyze the following code function for security vulnerabilities
|
public AttachmentVersioningStore getDefaultAttachmentArchiveStore()
{
return this.defaultAttachmentArchiveStore;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultAttachmentArchiveStore
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
|
getDefaultAttachmentArchiveStore
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
public String asXml() {
Charset charsetName = null;
final HtmlPage htmlPage = getHtmlPageOrNull();
if (htmlPage != null) {
charsetName = htmlPage.getCharset();
}
final StringWriter stringWriter = new StringWriter();
try (PrintWriter printWriter = new PrintWriter(stringWriter)) {
if (charsetName != null && this instanceof HtmlHtml) {
printWriter.print("<?xml version=\"1.0\" encoding=\"");
printWriter.print(charsetName);
printWriter.print("\"?>\r\n");
}
printXml("", printWriter);
return stringWriter.toString();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: asXml
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
|
asXml
|
src/main/java/com/gargoylesoftware/htmlunit/html/DomNode.java
|
940dc7fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public void updateChatMsgHint() {
final boolean multi = conversation.getMode() == Conversation.MODE_MULTI;
if (conversation.getCorrectingMessage() != null) {
this.binding.textinput.setHint(R.string.send_corrected_message);
} else if (multi && conversation.getNextCounterpart() != null) {
this.binding.textinput.setHint(getString(
R.string.send_private_message_to,
conversation.getNextCounterpart().getResource()));
} else if (multi && !conversation.getMucOptions().participating()) {
this.binding.textinput.setHint(R.string.you_are_not_participating);
} else {
this.binding.textinput.setHint(UIHelper.getMessageHint(getActivity(), conversation));
getActivity().invalidateOptionsMenu();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateChatMsgHint
File: src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
updateChatMsgHint
|
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
protected String getAutocomplete() {
return this.autocomplete;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getAutocomplete
File: spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
Repository: spring-projects/spring-framework
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2014-1904
|
MEDIUM
| 4.3
|
spring-projects/spring-framework
|
getAutocomplete
|
spring-webmvc/src/main/java/org/springframework/web/servlet/tags/form/FormTag.java
|
741b4b229ae032bd17175b46f98673ce0bd2d485
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean getSuppressShowOverApps() {
return mSuppressShowOverApps;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getSuppressShowOverApps
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
getSuppressShowOverApps
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private LinkStore getLinkStore()
{
return Utils.getComponent(LinkStore.class);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLinkStore
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-74"
] |
CVE-2023-29523
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getLinkStore
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
0d547181389f7941e53291af940966413823f61c
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int checkPermission(String permName, String pkgName, int userId) {
if (!sUserManager.exists(userId)) {
return PackageManager.PERMISSION_DENIED;
}
synchronized (mPackages) {
final PackageParser.Package p = mPackages.get(pkgName);
if (p != null && p.mExtras != null) {
final PackageSetting ps = (PackageSetting) p.mExtras;
final PermissionsState permissionsState = ps.getPermissionsState();
if (permissionsState.hasPermission(permName, userId)) {
return PackageManager.PERMISSION_GRANTED;
}
// Special case: ACCESS_FINE_LOCATION permission includes ACCESS_COARSE_LOCATION
if (Manifest.permission.ACCESS_COARSE_LOCATION.equals(permName) && permissionsState
.hasPermission(Manifest.permission.ACCESS_FINE_LOCATION, userId)) {
return PackageManager.PERMISSION_GRANTED;
}
}
}
return PackageManager.PERMISSION_DENIED;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: checkPermission
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
|
checkPermission
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Deprecated
public BaseObject getObject(String className, String key, String value, boolean failover)
{
return getXObject(resolveClassReference(className), key, value, failover);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObject
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
|
getObject
|
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 static Future<Map<String,String>> getThreadDumpAsync(VirtualChannel channel) throws IOException, InterruptedException {
if(channel==null)
return new AsyncFutureImpl<Map<String, String>>(Collections.singletonMap("N/A","offline"));
return channel.callAsync(new GetThreadDump());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getThreadDumpAsync
File: core/src/main/java/hudson/util/RemotingDiagnostics.java
Repository: jenkinsci/jenkins
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-2068
|
LOW
| 3.5
|
jenkinsci/jenkins
|
getThreadDumpAsync
|
core/src/main/java/hudson/util/RemotingDiagnostics.java
|
0530a6645aac10fec005614211660e98db44b5eb
| 0
|
Analyze the following code function for security vulnerabilities
|
private void setupLocked() {
mShowKeyguardWakeLock = mPM.newWakeLock(PowerManager.PARTIAL_WAKE_LOCK, "show keyguard");
mShowKeyguardWakeLock.setReferenceCounted(false);
IntentFilter filter = new IntentFilter();
filter.addAction(Intent.ACTION_SHUTDOWN);
mBroadcastDispatcher.registerReceiver(mBroadcastReceiver, filter);
final IntentFilter delayedActionFilter = new IntentFilter();
delayedActionFilter.addAction(DELAYED_KEYGUARD_ACTION);
delayedActionFilter.addAction(DELAYED_LOCK_PROFILE_ACTION);
delayedActionFilter.setPriority(IntentFilter.SYSTEM_HIGH_PRIORITY);
mContext.registerReceiver(mDelayedLockBroadcastReceiver, delayedActionFilter,
SYSTEMUI_PERMISSION, null /* scheduler */,
Context.RECEIVER_EXPORTED_UNAUDITED);
mAlarmManager = (AlarmManager) mContext.getSystemService(Context.ALARM_SERVICE);
KeyguardUpdateMonitor.setCurrentUser(ActivityManager.getCurrentUser());
// Assume keyguard is showing (unless it's disabled) until we know for sure, unless Keyguard
// is disabled.
if (isKeyguardServiceEnabled()) {
setShowingLocked(!shouldWaitForProvisioning()
&& !mLockPatternUtils.isLockScreenDisabled(
KeyguardUpdateMonitor.getCurrentUser()), true /* forceCallbacks */);
} else {
// The system's keyguard is disabled or missing.
setShowingLocked(false /* showing */, true /* forceCallbacks */);
}
final ContentResolver cr = mContext.getContentResolver();
mDeviceInteractive = mPM.isInteractive();
mLockSounds = new SoundPool.Builder()
.setMaxStreams(1)
.setAudioAttributes(
new AudioAttributes.Builder()
.setUsage(AudioAttributes.USAGE_ASSISTANCE_SONIFICATION)
.setContentType(AudioAttributes.CONTENT_TYPE_SONIFICATION)
.build())
.build();
String soundPath = Settings.Global.getString(cr, Settings.Global.LOCK_SOUND);
if (soundPath != null) {
mLockSoundId = mLockSounds.load(soundPath, 1);
}
if (soundPath == null || mLockSoundId == 0) {
Log.w(TAG, "failed to load lock sound from " + soundPath);
}
soundPath = Settings.Global.getString(cr, Settings.Global.UNLOCK_SOUND);
if (soundPath != null) {
mUnlockSoundId = mLockSounds.load(soundPath, 1);
}
if (soundPath == null || mUnlockSoundId == 0) {
Log.w(TAG, "failed to load unlock sound from " + soundPath);
}
soundPath = Settings.Global.getString(cr, Settings.Global.TRUSTED_SOUND);
if (soundPath != null) {
mTrustedSoundId = mLockSounds.load(soundPath, 1);
}
if (soundPath == null || mTrustedSoundId == 0) {
Log.w(TAG, "failed to load trusted sound from " + soundPath);
}
int lockSoundDefaultAttenuation = mContext.getResources().getInteger(
com.android.internal.R.integer.config_lockSoundVolumeDb);
mLockSoundVolume = (float)Math.pow(10, (float)lockSoundDefaultAttenuation/20);
mHideAnimation = AnimationUtils.loadAnimation(mContext,
com.android.internal.R.anim.lock_screen_behind_enter);
mWorkLockController = new WorkLockActivityController(mContext);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setupLocked
File: packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21267
|
MEDIUM
| 5.5
|
android
|
setupLocked
|
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
|
d18d8b350756b0e89e051736c1f28744ed31e93a
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setTaskResizeable(int taskId, boolean resizeable) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTaskResizeable
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
setTaskResizeable
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
private DocumentReferenceResolver<EntityReference> getCurrentGetDocumentResolver()
{
if (this.currentgetdocumentResolver == null) {
this.currentgetdocumentResolver =
Utils.getComponent(DocumentReferenceResolver.TYPE_REFERENCE, "currentgetdocument");
}
return this.currentgetdocumentResolver;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCurrentGetDocumentResolver
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
|
getCurrentGetDocumentResolver
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/XWiki.java
|
f9a677408ffb06f309be46ef9d8df1915d9099a4
| 0
|
Analyze the following code function for security vulnerabilities
|
private List<String> getTranslationList(DocumentReference documentReference) throws QueryException
{
// Note that the query is made to work with Oracle which treats empty strings as null.
String hql = "select doc.language from XWikiDocument as doc where doc.space = :space and doc.name = :name "
+ "and (doc.language <> '' or (doc.language is not null and '' is null))";
org.xwiki.query.Query query = getQueryManager().createQuery(hql, org.xwiki.query.Query.HQL);
query.setWiki(documentReference.getWikiReference().getName());
query.bindValue("space", this.localEntityReferenceSerializer.serialize(documentReference.getParent()));
query.bindValue("name", documentReference.getName());
return query.execute();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTranslationList
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-459"
] |
CVE-2023-36468
|
HIGH
| 8.8
|
xwiki/xwiki-platform
|
getTranslationList
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateStore.java
|
15a6f845d8206b0ae97f37aa092ca43d4f9d6e59
| 0
|
Analyze the following code function for security vulnerabilities
|
public void renameProperties(DocumentReference classReference, Map<String, String> fieldsToRename)
{
List<BaseObject> objects = this.xObjects.get(classReference);
if (objects == null) {
return;
}
boolean isDirty = false;
for (BaseObject bobject : objects) {
if (bobject == null) {
continue;
}
for (Map.Entry<String, String> entry : fieldsToRename.entrySet()) {
String origname = entry.getKey();
String newname = entry.getValue();
BaseProperty origprop = (BaseProperty) bobject.safeget(origname);
if (origprop != null) {
BaseProperty prop = origprop.clone();
bobject.removeField(origname);
prop.setName(newname);
bobject.addField(newname, prop);
isDirty = true;
}
}
}
// If at least one property was renamed, mark the document dirty.
if (isDirty) {
setMetaDataDirty(true);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: renameProperties
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
|
renameProperties
|
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 static int getTotalTextAreas(Structure structure)
{
String typeField = Field.FieldType.TEXT_AREA.toString();
return getTotals(structure,typeField);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTotalTextAreas
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
|
getTotalTextAreas
|
src/com/dotmarketing/portlets/structure/factories/StructureFactory.java
|
897f3632d7e471b7a73aabed5b19f6f53d4e5562
| 0
|
Analyze the following code function for security vulnerabilities
|
void sendAccessibilityEvent(Notification notification, CharSequence packageName) {
AccessibilityManager manager = AccessibilityManager.getInstance(getContext());
if (!manager.isEnabled()) {
return;
}
AccessibilityEvent event =
AccessibilityEvent.obtain(AccessibilityEvent.TYPE_NOTIFICATION_STATE_CHANGED);
event.setPackageName(packageName);
event.setClassName(Notification.class.getName());
event.setParcelableData(notification);
CharSequence tickerText = notification.tickerText;
if (!TextUtils.isEmpty(tickerText)) {
event.getText().add(tickerText);
}
manager.sendAccessibilityEvent(event);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: sendAccessibilityEvent
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
sendAccessibilityEvent
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
public ApiClient setServerIndex(Integer serverIndex) {
this.serverIndex = serverIndex;
updateBasePath();
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setServerIndex
File: samples/client/petstore/java/resteasy/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
|
setServerIndex
|
samples/client/petstore/java/resteasy/src/main/java/org/openapitools/client/ApiClient.java
|
2c576483f26f85b3979c6948a131f585c237109a
| 0
|
Analyze the following code function for security vulnerabilities
|
public TProtocol getProtocol(TTransport trans) {
return new TCompactProtocol(trans, maxNetworkBytes_);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProtocol
File: thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
Repository: facebook/fbthrift
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2019-11938
|
MEDIUM
| 5
|
facebook/fbthrift
|
getProtocol
|
thrift/lib/java/src/main/java/com/facebook/thrift/protocol/TCompactProtocol.java
|
08c2d412adb214c40bb03be7587057b25d053030
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void writeObject(Object value) throws JMSException {
writeObject(value,false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: writeObject
File: src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
Repository: rabbitmq/rabbitmq-jms-client
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2020-36282
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-jms-client
|
writeObject
|
src/main/java/com/rabbitmq/jms/client/message/RMQStreamMessage.java
|
f647e5dbfe055a2ca8cbb16dd70f9d50d888b638
| 0
|
Analyze the following code function for security vulnerabilities
|
private Commandline newDocker() {
if (getDockerExecutable() != null)
return new Commandline(getDockerExecutable());
else if (SystemUtils.IS_OS_MAC_OSX && new File("/usr/local/bin/docker").exists())
return new Commandline("/usr/local/bin/docker");
else
return new Commandline("docker");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: newDocker
File: server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
Repository: theonedev/onedev
The code follows secure coding practices.
|
[
"CWE-610"
] |
CVE-2022-39206
|
CRITICAL
| 9.9
|
theonedev/onedev
|
newDocker
|
server-plugin/server-plugin-executor-serverdocker/src/main/java/io/onedev/server/plugin/executor/serverdocker/ServerDockerExecutor.java
|
0052047a5b5095ac6a6b4a73a522d0272fec3a22
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getCharset(List<TValue> values) {
if (values.size() == 3)
return values.get(2).toString();
return VALUE_CHARSET_DEFAULT;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCharset
File: src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java
Repository: plantuml
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2023-3431
|
MEDIUM
| 5.3
|
plantuml
|
getCharset
|
src/net/sourceforge/plantuml/tim/stdlib/LoadJson.java
|
fbe7fa3b25b4c887d83927cffb1009ec6cb8ab1e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Descriptor getDescriptorByName(String id) {
return getDescriptor(id);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDescriptorByName
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
|
getDescriptorByName
|
core/src/main/java/jenkins/model/Jenkins.java
|
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
| 0
|
Analyze the following code function for security vulnerabilities
|
public XWikiStoreInterface getStore(XWikiContext context)
{
return context.getWiki().getStore();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getStore
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
|
getStore
|
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 Vector<Object> getObjects(String className)
{
List<BaseObject> objects = this.getDoc().getXObjects(this.doc.resolveClassReference(className));
return getXObjects(objects);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getObjects
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getObjects
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Filter filter() {
if (filter == null) {
return new Filter();
}
return filter;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: filter
File: config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-77"
] |
CVE-2021-43286
|
MEDIUM
| 6.5
|
gocd
|
filter
|
config/config-api/src/main/java/com/thoughtworks/go/config/materials/ScmMaterialConfig.java
|
6fa9fb7a7c91e760f1adc2593acdd50f2d78676b
| 0
|
Analyze the following code function for security vulnerabilities
|
public void revokeUriPermissionFromOwner(IBinder owner, Uri uri,
int mode, int userId) throws RemoteException;
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: revokeUriPermissionFromOwner
File: core/java/android/app/IActivityManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3832
|
HIGH
| 8.3
|
android
|
revokeUriPermissionFromOwner
|
core/java/android/app/IActivityManager.java
|
e7cf91a198de995c7440b3b64352effd2e309906
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected SimpleDateFormat initialValue() {
SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss z", Locale.US);
format.setTimeZone(TimeZone.getTimeZone("GMT"));
return format;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initialValue
File: core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
Repository: opencrx
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-46502
|
CRITICAL
| 9.8
|
opencrx
|
initialValue
|
core/src/main/java/org/opencrx/application/uses/net/sf/webdav/methods/WebDavMethod.java
|
ce7a71db0bb34ecbcb0e822d40598e410a48b399
| 0
|
Analyze the following code function for security vulnerabilities
|
private void migrate42(File dataDir, Stack<Integer> versions) {
Map<String, String> commentRequests = new HashMap<>();
Map<String, String> requestTargetHeads = new HashMap<>();
Map<String, String> requestBaseCommits = new HashMap<>();
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("CodeCommentRelations.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements())
commentRequests.put(element.elementTextTrim("comment"), element.elementTextTrim("request"));
} else if (file.getName().startsWith("PullRequests.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
String id = element.elementTextTrim("id");
requestBaseCommits.put(id, element.elementTextTrim("baseCommitHash"));
Element lastMergePreviewElement = element.element("lastMergePreview");
if (lastMergePreviewElement != null) {
Element targetHeadElement = lastMergePreviewElement.element("targetHead");
requestTargetHeads.put(id, targetHeadElement.getTextTrim());
targetHeadElement.setName("targetHeadCommitHash");
lastMergePreviewElement.element("requestHead").setName("headCommitHash");
Element mergedElement = lastMergePreviewElement.element("merged");
if (mergedElement != null)
mergedElement.setName("mergeCommitHash");
}
element.element("headCommitHash").detach();
}
dom.writeToFile(file, false);
}
}
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Settings.xml")) {
try {
String content = FileUtils.readFileToString(file, StandardCharsets.UTF_8.name());
content = StringUtils.replace(content,
"io.onedev.server.model.support.administration.authenticator.ldap.",
"io.onedev.server.plugin.authenticator.ldap.");
content = StringUtils.replace(content,
"io.onedev.server.model.support.issue.transitiontrigger.DiscardPullRequest",
"io.onedev.server.model.support.issue.transitiontrigger.DiscardPullRequestTrigger");
content = StringUtils.replace(content,
"io.onedev.server.model.support.issue.transitiontrigger.MergePullRequest",
"io.onedev.server.model.support.issue.transitiontrigger.MergePullRequestTrigger");
content = StringUtils.replace(content,
"io.onedev.server.model.support.issue.transitiontrigger.OpenPullRequest",
"io.onedev.server.model.support.issue.transitiontrigger.OpenPullRequestTrigger");
FileUtils.writeFile(file, content, StandardCharsets.UTF_8.name());
} catch (IOException e) {
throw new RuntimeException(e);
}
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element keyElement = element.element("key");
if (keyElement.getTextTrim().equals("SSH")) {
Element valueElement = element.element("value");
if (valueElement != null)
valueElement.element("privateKey").setName("pemPrivateKey");
} else if (keyElement.getTextTrim().equals("JOB_SCRIPTS")) {
keyElement.setText("GROOVY_SCRIPTS");
}
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("Projects.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element buildSettingElement = element.element("buildSetting");
Element actionAuthorizationsElement = buildSettingElement.element("actionAuthorizations");
if (actionAuthorizationsElement.elements().isEmpty()) {
actionAuthorizationsElement.addElement("io.onedev.server.model.support.build.actionauthorization.CreateTagAuthorization");
actionAuthorizationsElement.addElement("io.onedev.server.model.support.build.actionauthorization.CloseMilestoneAuthorization");
}
element.addElement("issueManagementEnabled").setText("true");
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("CodeComments.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element compareContextElement = element.element("compareContext");
compareContextElement.element("compareCommit").setName("compareCommitHash");
Element markPosElement = element.element("markPos");
markPosElement.setName("mark");
markPosElement.element("commit").setName("commitHash");
String requestId = commentRequests.get(element.elementTextTrim("id"));
if (requestId != null)
element.addElement("request").setText(requestId);
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("Builds.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements())
element.addElement("submitReason").setText("Unknown");
dom.writeToFile(file, false);
} else if (file.getName().startsWith("CodeCommentRelations.xml")) {
FileUtils.deleteFile(file);
} else if (file.getName().startsWith("PullRequestBuilds.xml")) {
try {
String content = FileUtils.readFileToString(file, StandardCharsets.UTF_8.name());
content = StringUtils.replace(content, "PullRequestBuild", "PullRequestVerification");
FileUtils.deleteFile(file);
String newFileName = StringUtils.replace(file.getName(), "PullRequestBuild", "PullRequestVerification");
FileUtils.writeFile(new File(dataDir, newFileName), content, StandardCharsets.UTF_8.name());
} catch (IOException e) {
throw new RuntimeException(e);
}
} else if (file.getName().startsWith("PullRequestReviews.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element excludeDateElement = element.element("excludeDate");
if (excludeDateElement != null)
excludeDateElement.detach();
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("Users.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
element.addElement("accessToken").setText(RandomStringUtils.randomAlphanumeric(40));
element.addElement("ssoInfo").addElement("subject").setText(UUID.randomUUID().toString());
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("PullRequestUpdates.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
element.element("mergeBaseCommitHash").detach();
String requestId = element.elementTextTrim("request");
String targetHead = requestTargetHeads.get(requestId);
Element targetHeadCommitHashElement = element.addElement("targetHeadCommitHash");
if (targetHead != null)
targetHeadCommitHashElement.setText(targetHead);
else
targetHeadCommitHashElement.setText(requestBaseCommits.get(requestId));
}
dom.writeToFile(file, false);
}
}
}
|
Vulnerability Classification:
- CWE: CWE-338
- CVE: CVE-2023-24828
- Severity: HIGH
- CVSS Score: 8.8
Description: Fix issue #1179 - OneDev should use crypto strong random string for access token and password reset
Function: migrate42
File: server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
Repository: theonedev/onedev
Fixed Code:
private void migrate42(File dataDir, Stack<Integer> versions) {
Map<String, String> commentRequests = new HashMap<>();
Map<String, String> requestTargetHeads = new HashMap<>();
Map<String, String> requestBaseCommits = new HashMap<>();
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("CodeCommentRelations.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements())
commentRequests.put(element.elementTextTrim("comment"), element.elementTextTrim("request"));
} else if (file.getName().startsWith("PullRequests.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
String id = element.elementTextTrim("id");
requestBaseCommits.put(id, element.elementTextTrim("baseCommitHash"));
Element lastMergePreviewElement = element.element("lastMergePreview");
if (lastMergePreviewElement != null) {
Element targetHeadElement = lastMergePreviewElement.element("targetHead");
requestTargetHeads.put(id, targetHeadElement.getTextTrim());
targetHeadElement.setName("targetHeadCommitHash");
lastMergePreviewElement.element("requestHead").setName("headCommitHash");
Element mergedElement = lastMergePreviewElement.element("merged");
if (mergedElement != null)
mergedElement.setName("mergeCommitHash");
}
element.element("headCommitHash").detach();
}
dom.writeToFile(file, false);
}
}
for (File file: dataDir.listFiles()) {
if (file.getName().startsWith("Settings.xml")) {
try {
String content = FileUtils.readFileToString(file, StandardCharsets.UTF_8.name());
content = StringUtils.replace(content,
"io.onedev.server.model.support.administration.authenticator.ldap.",
"io.onedev.server.plugin.authenticator.ldap.");
content = StringUtils.replace(content,
"io.onedev.server.model.support.issue.transitiontrigger.DiscardPullRequest",
"io.onedev.server.model.support.issue.transitiontrigger.DiscardPullRequestTrigger");
content = StringUtils.replace(content,
"io.onedev.server.model.support.issue.transitiontrigger.MergePullRequest",
"io.onedev.server.model.support.issue.transitiontrigger.MergePullRequestTrigger");
content = StringUtils.replace(content,
"io.onedev.server.model.support.issue.transitiontrigger.OpenPullRequest",
"io.onedev.server.model.support.issue.transitiontrigger.OpenPullRequestTrigger");
FileUtils.writeFile(file, content, StandardCharsets.UTF_8.name());
} catch (IOException e) {
throw new RuntimeException(e);
}
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element keyElement = element.element("key");
if (keyElement.getTextTrim().equals("SSH")) {
Element valueElement = element.element("value");
if (valueElement != null)
valueElement.element("privateKey").setName("pemPrivateKey");
} else if (keyElement.getTextTrim().equals("JOB_SCRIPTS")) {
keyElement.setText("GROOVY_SCRIPTS");
}
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("Projects.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element buildSettingElement = element.element("buildSetting");
Element actionAuthorizationsElement = buildSettingElement.element("actionAuthorizations");
if (actionAuthorizationsElement.elements().isEmpty()) {
actionAuthorizationsElement.addElement("io.onedev.server.model.support.build.actionauthorization.CreateTagAuthorization");
actionAuthorizationsElement.addElement("io.onedev.server.model.support.build.actionauthorization.CloseMilestoneAuthorization");
}
element.addElement("issueManagementEnabled").setText("true");
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("CodeComments.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element compareContextElement = element.element("compareContext");
compareContextElement.element("compareCommit").setName("compareCommitHash");
Element markPosElement = element.element("markPos");
markPosElement.setName("mark");
markPosElement.element("commit").setName("commitHash");
String requestId = commentRequests.get(element.elementTextTrim("id"));
if (requestId != null)
element.addElement("request").setText(requestId);
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("Builds.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements())
element.addElement("submitReason").setText("Unknown");
dom.writeToFile(file, false);
} else if (file.getName().startsWith("CodeCommentRelations.xml")) {
FileUtils.deleteFile(file);
} else if (file.getName().startsWith("PullRequestBuilds.xml")) {
try {
String content = FileUtils.readFileToString(file, StandardCharsets.UTF_8.name());
content = StringUtils.replace(content, "PullRequestBuild", "PullRequestVerification");
FileUtils.deleteFile(file);
String newFileName = StringUtils.replace(file.getName(), "PullRequestBuild", "PullRequestVerification");
FileUtils.writeFile(new File(dataDir, newFileName), content, StandardCharsets.UTF_8.name());
} catch (IOException e) {
throw new RuntimeException(e);
}
} else if (file.getName().startsWith("PullRequestReviews.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
Element excludeDateElement = element.element("excludeDate");
if (excludeDateElement != null)
excludeDateElement.detach();
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("Users.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
element.addElement("accessToken").setText(CryptoUtils.generateSecret());
element.addElement("ssoInfo").addElement("subject").setText(UUID.randomUUID().toString());
}
dom.writeToFile(file, false);
} else if (file.getName().startsWith("PullRequestUpdates.xml")) {
VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file);
for (Element element: dom.getRootElement().elements()) {
element.element("mergeBaseCommitHash").detach();
String requestId = element.elementTextTrim("request");
String targetHead = requestTargetHeads.get(requestId);
Element targetHeadCommitHashElement = element.addElement("targetHeadCommitHash");
if (targetHead != null)
targetHeadCommitHashElement.setText(targetHead);
else
targetHeadCommitHashElement.setText(requestBaseCommits.get(requestId));
}
dom.writeToFile(file, false);
}
}
}
|
[
"CWE-338"
] |
CVE-2023-24828
|
HIGH
| 8.8
|
theonedev/onedev
|
migrate42
|
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
|
d67dd9686897fe5e4ab881d749464aa7c06a68e5
| 1
|
Analyze the following code function for security vulnerabilities
|
public ServerBuilder meterRegistry(MeterRegistry meterRegistry) {
this.meterRegistry = requireNonNull(meterRegistry, "meterRegistry");
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: meterRegistry
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
|
meterRegistry
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
final boolean isCameraActiveForUid(@UserIdInt int uid) {
synchronized (mActiveCameraUids) {
return mActiveCameraUids.indexOf(uid) >= 0;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCameraActiveForUid
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
|
isCameraActiveForUid
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
private void unbindAppWidgetRemoteViewsServicesLocked(Widget widget) {
int appWidgetId = widget.appWidgetId;
// Unbind all connections to Services bound to this AppWidgetId
Iterator<Pair<Integer, Intent.FilterComparison>> it = mBoundRemoteViewsServices.keySet()
.iterator();
while (it.hasNext()) {
final Pair<Integer, Intent.FilterComparison> key = it.next();
if (key.first == appWidgetId) {
final ServiceConnectionProxy conn = (ServiceConnectionProxy)
mBoundRemoteViewsServices.get(key);
conn.disconnect();
mContext.unbindService(conn);
it.remove();
}
}
// Check if we need to destroy any services (if no other app widgets are
// referencing the same service)
decrementAppWidgetServiceRefCount(widget);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: unbindAppWidgetRemoteViewsServicesLocked
File: services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2015-1541
|
MEDIUM
| 4.3
|
android
|
unbindAppWidgetRemoteViewsServicesLocked
|
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
|
0b98d304c467184602b4c6bce76fda0b0274bc07
| 0
|
Analyze the following code function for security vulnerabilities
|
private UserAuthenticatedEventNotifier getUserAuthenticatedEventNotifier()
{
if ( this.userAuthenticatedEventNotifier == null ) {
this.userAuthenticatedEventNotifier = Utils.getComponent(UserAuthenticatedEventNotifier.class);
}
return this.userAuthenticatedEventNotifier;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserAuthenticatedEventNotifier
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/MyFormAuthenticator.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-601"
] |
CVE-2022-23618
|
MEDIUM
| 5.8
|
xwiki/xwiki-platform
|
getUserAuthenticatedEventNotifier
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/user/impl/xwiki/MyFormAuthenticator.java
|
5251c02080466bf9fb55288f04a37671108f8096
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Document build(final Reader characterStream, final String systemId)
throws JDOMException, IOException {
try {
return getEngine().build(characterStream, systemId);
} finally {
if (!reuseParser) {
engine = null;
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: build
File: core/src/java/org/jdom2/input/SAXBuilder.java
Repository: hunterhacker/jdom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2021-33813
|
MEDIUM
| 5
|
hunterhacker/jdom
|
build
|
core/src/java/org/jdom2/input/SAXBuilder.java
|
bd3ab78370098491911d7fe9d7a43b97144a234e
| 0
|
Analyze the following code function for security vulnerabilities
|
private Set<Integer> removeCaApprovalsIfNeeded(int userId) {
final ArraySet<Integer> affectedUserIds = new ArraySet<>();
for (UserInfo userInfo : mUserManager.getProfiles(userId)) {
boolean isSecure = mLockPatternUtils.isSecure(userInfo.id);
if (userInfo.isManagedProfile()){
isSecure |= mLockPatternUtils.isSecure(getProfileParentId(userInfo.id));
}
if (!isSecure) {
synchronized (getLockObject()) {
getUserData(userInfo.id).mAcceptedCaCertificates.clear();
affectedUserIds.add(userInfo.id);
}
mCertificateMonitor.onCertificateApprovalsChanged(userId);
}
}
return affectedUserIds;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeCaApprovalsIfNeeded
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
|
removeCaApprovalsIfNeeded
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onReady(@Nonnull ReadyEvent event) {
BotWorker.setState(BotState.STARTED);
Main.getInstance().getLogger().info("Boot up finished!");
Main.getInstance().getCommandManager().addSlashCommand(event.getJDA());
BotWorker.setActivity(event.getJDA(), "ree6.de | %guilds% Servers. (%shard%)", Activity.ActivityType.PLAYING);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onReady
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
|
onReady
|
src/main/java/de/presti/ree6/events/OtherEvents.java
|
459b5bc24f0ea27e50031f563373926e94b9aa0a
| 0
|
Analyze the following code function for security vulnerabilities
|
private static Path getPath(String url) {
Path urlPath;
URL toURL = null;
try {
final URI uri = URI.create(url.trim());
toURL = uri.toURL();
urlPath = Paths.get(uri);
} catch (Exception e) {
if (toURL != null) {
urlPath = Paths.get(StringUtils.isBlank(toURL.getFile()) ? toURL.getHost() : toURL.getFile());
} else {
urlPath = Paths.get(url);
}
}
return urlPath;
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2022-23532
- Severity: MEDIUM
- CVSS Score: 6.5
Description: 4.4 export security fix (#3370)
* [vFQk1rX0] Fix security issue
* [vFQk1rX0] Add more test cases from PR review
Function: getPath
File: core/src/main/java/apoc/util/FileUtils.java
Repository: neo4j-contrib/neo4j-apoc-procedures
Fixed Code:
private static Path getPath(String url) {
Path urlPath;
URL toURL = null;
try {
final URI uri = URI.create(url.trim()).normalize();
toURL = uri.toURL();
urlPath = Paths.get(uri);
} catch (Exception e) {
if (toURL != null) {
urlPath = Paths.get(StringUtils.isBlank(toURL.getFile()) ? toURL.getHost() : toURL.getFile());
} else {
urlPath = Paths.get(url);
}
}
return urlPath;
}
|
[
"CWE-22"
] |
CVE-2022-23532
|
MEDIUM
| 6.5
|
neo4j-contrib/neo4j-apoc-procedures
|
getPath
|
core/src/main/java/apoc/util/FileUtils.java
|
01e63ed2d187cd2a8aa1d78bf831ef0fdd69b522
| 1
|
Analyze the following code function for security vulnerabilities
|
private RenderingCache getRenderingCache()
{
if (this.renderingCache == null) {
this.renderingCache = Utils.getComponent((Type) RenderingCache.class);
}
return this.renderingCache;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRenderingCache
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
|
getRenderingCache
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public Intent getIntent() {
Intent modIntent = new Intent(super.getIntent());
modIntent.putExtra(EXTRA_SHOW_FRAGMENT, getFragmentClass().getName());
return modIntent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getIntent
File: src/com/android/settings/password/ChooseLockPattern.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
getIntent
|
src/com/android/settings/password/ChooseLockPattern.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
private static void addEapUpgradableSecurityTypeIfNecessary(WifiConfiguration config) {
if (!config.isSecurityType(WifiConfiguration.SECURITY_TYPE_EAP)) return;
if (config.isSecurityType(WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE)) return;
Log.d(TAG, "Add upgradable Enterprise configuration.");
SecurityParams wpa3EnterpriseParams = SecurityParams.createSecurityParamsBySecurityType(
WifiConfiguration.SECURITY_TYPE_EAP_WPA3_ENTERPRISE);
wpa3EnterpriseParams.setIsAddedByAutoUpgrade(true);
config.addSecurityParams(wpa3EnterpriseParams);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addEapUpgradableSecurityTypeIfNecessary
File: service/java/com/android/server/wifi/WifiConfigurationUtil.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21252
|
MEDIUM
| 5.5
|
android
|
addEapUpgradableSecurityTypeIfNecessary
|
service/java/com/android/server/wifi/WifiConfigurationUtil.java
|
50b08ee30e04d185e5ae97a5f717d436fd5a90f3
| 0
|
Analyze the following code function for security vulnerabilities
|
private @UserIdInt int getLogoutUserIdUnchecked() {
synchronized (getLockObject()) {
return mLogoutUserId;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getLogoutUserIdUnchecked
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
|
getLogoutUserIdUnchecked
|
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
|
ed3f25b7222d4cff471f2b7d22d1150348146957
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void setDefaultBundleAndDeferCallback(BundleAndDeferCallback defaultBundleAndDeferCallback) {
XMPPTCPConnection.defaultBundleAndDeferCallback = defaultBundleAndDeferCallback;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setDefaultBundleAndDeferCallback
File: smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
Repository: igniterealtime/Smack
The code follows secure coding practices.
|
[
"CWE-362"
] |
CVE-2016-10027
|
MEDIUM
| 4.3
|
igniterealtime/Smack
|
setDefaultBundleAndDeferCallback
|
smack-tcp/src/main/java/org/jivesoftware/smack/tcp/XMPPTCPConnection.java
|
a9d5cd4a611f47123f9561bc5a81a4555fe7cb04
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setTags(@Nullable String tags) {
this.tags = tags;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setTags
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setTags
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/OpsGenieNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
String getRequestFilename(HttpServletRequest request) {
// http://localhost:8888/context/servlet/folder/file.js
// ->
// /servlet/folder/file.js
//
// http://localhost:8888/context/servlet/VAADIN/folder/file.js
// ->
// /VAADIN/folder/file.js
if (request.getPathInfo() == null) {
return request.getServletPath();
} else if (request.getPathInfo().startsWith("/" + VAADIN_MAPPING)) {
return request.getPathInfo();
}
return request.getServletPath() + request.getPathInfo();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRequestFilename
File: flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36321
|
MEDIUM
| 5
|
vaadin/flow
|
getRequestFilename
|
flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java
|
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
boolean isVisibleRequested() {
final boolean localVisibleRequested =
wouldBeVisibleRequestedIfPolicyIgnored() && isVisibleByPolicyOrInsets();
if (localVisibleRequested && shouldCheckTokenVisibleRequested()) {
return mToken.isVisibleRequested();
}
return localVisibleRequested;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isVisibleRequested
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
|
isVisibleRequested
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
void handleLaunchTaskBehindCompleteLocked(ActivityRecord r) {
r.mLaunchTaskBehind = false;
final TaskRecord task = r.task;
task.setLastThumbnail(task.stack.screenshotActivities(r));
mRecentTasks.addLocked(task);
mService.notifyTaskStackChangedLocked();
mWindowManager.setAppVisibility(r.appToken, false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleLaunchTaskBehindCompleteLocked
File: services/core/java/com/android/server/am/ActivityStackSupervisor.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3838
|
MEDIUM
| 4.3
|
android
|
handleLaunchTaskBehindCompleteLocked
|
services/core/java/com/android/server/am/ActivityStackSupervisor.java
|
468651c86a8adb7aa56c708d2348e99022088af3
| 0
|
Analyze the following code function for security vulnerabilities
|
public static StartElement getNextStartElement(XMLEventReader xmlEventReader) throws ParsingException {
try {
while (xmlEventReader.hasNext()) {
XMLEvent xmlEvent = xmlEventReader.nextEvent();
if (xmlEvent == null || xmlEvent.isStartElement())
return (StartElement) xmlEvent;
}
} catch (XMLStreamException e) {
throw logger.parserException(e);
}
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getNextStartElement
File: saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
Repository: keycloak
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2017-2582
|
MEDIUM
| 4
|
keycloak
|
getNextStartElement
|
saml-core/src/main/java/org/keycloak/saml/common/util/StaxParserUtil.java
|
0cb5ba0f6e83162d221681f47b470c3042eef237
| 0
|
Analyze the following code function for security vulnerabilities
|
public User getUser(DocumentReference userReference)
{
return this.xwiki.getUser(userReference, getXWikiContext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUser
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-668"
] |
CVE-2023-37911
|
MEDIUM
| 6.5
|
xwiki/xwiki-platform
|
getUser
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/XWiki.java
|
f471f2a392aeeb9e51d59fdfe1d76fccf532523f
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setMessage(String message) {
this.message = parser.parseExpression(message, ParserContext.TEMPLATE_EXPRESSION);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setMessage
File: spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/TelegramNotifier.java
Repository: codecentric/spring-boot-admin
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-46166
|
CRITICAL
| 9.8
|
codecentric/spring-boot-admin
|
setMessage
|
spring-boot-admin-server/src/main/java/de/codecentric/boot/admin/server/notify/TelegramNotifier.java
|
c14c3ec12533f71f84de9ce3ce5ceb7991975f75
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void handleCommandStatus(String status, long updateCount, long insertOID) {
handleError(new PSQLException(GT.tr("Unexpected command status: {0}.", status),
PSQLState.PROTOCOL_VIOLATION));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: handleCommandStatus
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
handleCommandStatus
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.