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
@JRubyMethod(name = "memory", meta = true) public static IRubyObject parse_memory(ThreadContext context, IRubyObject klazz, IRubyObject data) { final Ruby runtime = context.runtime; XmlSaxParserContext ctx = newInstance(runtime, (RubyClass) klazz); ctx.initialize(runtime); ctx.setStringInputSource(context, data, runtime.getNil()); return ctx; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parse_memory File: ext/java/nokogiri/XmlSaxParserContext.java Repository: sparklemotion/nokogiri The code follows secure coding practices.
[ "CWE-241" ]
CVE-2022-29181
MEDIUM
6.4
sparklemotion/nokogiri
parse_memory
ext/java/nokogiri/XmlSaxParserContext.java
db05ba9a1bd4b90aa6c76742cf6102a7c7297267
0
Analyze the following code function for security vulnerabilities
@Override public PackageCleanItem nextPackageToClean(PackageCleanItem lastPackage) { // writer synchronized (mPackages) { if (!isExternalMediaAvailable()) { // If the external storage is no longer mounted at this point, // the caller may not have been able to delete all of this // packages files and can not delete any more. Bail. return null; } final ArrayList<PackageCleanItem> pkgs = mSettings.mPackagesToBeCleaned; if (lastPackage != null) { pkgs.remove(lastPackage); } if (pkgs.size() > 0) { return pkgs.get(0); } } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: nextPackageToClean 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
nextPackageToClean
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
private boolean isInQsArea(float x, float y) { return (x >= mQsFrame.getX() && x <= mQsFrame.getX() + mQsFrame.getWidth()) && (y <= mNotificationStackScroller.getBottomMostNotificationBottom() || y <= mQs.getView().getY() + mQs.getView().getHeight()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isInQsArea File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
isInQsArea
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
@Override public void onTextDeleted() { final XmppConnectionService service = activity == null ? null : activity.xmppConnectionService; if (service == null) { return; } Account.State status = conversation.getAccount().getStatus(); if (status == Account.State.ONLINE && conversation.setOutgoingChatState(Config.DEFAULT_CHATSTATE)) { service.sendChatState(conversation); } if (storeNextMessage()) { activity.onConversationsListItemUpdated(); } updateSendButton(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: onTextDeleted 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
onTextDeleted
src/main/java/eu/siacs/conversations/ui/ConversationFragment.java
7177c523a1b31988666b9337249a4f1d0c36f479
0
Analyze the following code function for security vulnerabilities
public static byte[] obj2bytes(Marshaller marshaller, Object o, boolean isKey, int estimateKeySize, int estimateValueSize) { try { return marshaller.objectToByteBuffer(o, isKey ? estimateKeySize : estimateValueSize); } catch (IOException ioe) { throw new HotRodClientException( "Unable to marshall object of type [" + o.getClass().getName() + "]", ioe); } catch (InterruptedException ie) { Thread.currentThread().interrupt(); return null; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: obj2bytes File: client/hotrod-client/src/main/java/org/infinispan/client/hotrod/marshall/MarshallerUtil.java Repository: infinispan The code follows secure coding practices.
[ "CWE-502" ]
CVE-2017-15089
MEDIUM
6.5
infinispan
obj2bytes
client/hotrod-client/src/main/java/org/infinispan/client/hotrod/marshall/MarshallerUtil.java
efc44b7b0a5dd4f44773808840dd9785cabcf21c
0
Analyze the following code function for security vulnerabilities
public double getHeaderRowHeight() { return getState(false).headerRowHeight; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHeaderRowHeight 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
getHeaderRowHeight
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
public static String getHomeUrlWithHost(HttpServletRequest request) { return "//" + request.getHeader("host") + request.getContextPath() + "/"; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getHomeUrlWithHost File: common/src/main/java/com/zrlog/web/util/WebTools.java Repository: 94fzb/zrlog The code follows secure coding practices.
[ "CWE-79" ]
CVE-2020-21316
MEDIUM
4.3
94fzb/zrlog
getHomeUrlWithHost
common/src/main/java/com/zrlog/web/util/WebTools.java
b921c1ae03b8290f438657803eee05226755c941
0
Analyze the following code function for security vulnerabilities
public BigInteger calculateMessage() { DHKeyPairGenerator dhGen = new DHKeyPairGenerator(); dhGen.init(new DHKeyGenerationParameters(random, dhParams)); AsymmetricCipherKeyPair dhPair = dhGen.generateKeyPair(); this.privateValue = ((DHPrivateKeyParameters)dhPair.getPrivate()).getX(); return ((DHPublicKeyParameters)dhPair.getPublic()).getY(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: calculateMessage File: core/src/main/java/org/bouncycastle/crypto/agreement/DHAgreement.java Repository: bcgit/bc-java The code follows secure coding practices.
[ "CWE-320" ]
CVE-2016-1000346
MEDIUM
4.3
bcgit/bc-java
calculateMessage
core/src/main/java/org/bouncycastle/crypto/agreement/DHAgreement.java
1127131c89021612c6eefa26dbe5714c194e7495
0
Analyze the following code function for security vulnerabilities
public void setSecurityService(SecurityService securityService) { this.securityService = securityService; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setSecurityService File: modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-863" ]
CVE-2021-21318
MEDIUM
5.5
opencast
setSecurityService
modules/search-service-impl/src/main/java/org/opencastproject/search/impl/persistence/SearchServiceDatabaseImpl.java
b18c6a7f81f08ed14884592a6c14c9ab611ad450
0
Analyze the following code function for security vulnerabilities
public static void main(String[] args) throws Exception { if (args[0].equals("-readDoc")) { Document doc = readDocumentFromFile(args[1]); System.out.println(doc); } else { String s = IOUtils.slurpFile(args[0]); Reader r = new StringReader(s); String tag = readTag(r); while (tag != null && ! tag.isEmpty()) { readUntilTag(r); tag = readTag(r); if (tag == null || tag.isEmpty()) { break; } System.out.println("got tag=" + new XMLTag(tag)); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: main File: src/edu/stanford/nlp/util/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-0239
HIGH
7.5
stanfordnlp/CoreNLP
main
src/edu/stanford/nlp/util/XMLUtils.java
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
0
Analyze the following code function for security vulnerabilities
public static Map<String, String> splitAsMap(String source, String paramDelim, String keyValDelim) { int keyValLen = keyValDelim.length(); // use LinkedHashMap to preserve the order of items Map<String, String> params = new LinkedHashMap<String, String>(); Iterator<String> itParams = CmsStringUtil.splitAsList(source, paramDelim, true).iterator(); while (itParams.hasNext()) { String param = itParams.next(); int pos = param.indexOf(keyValDelim); String key = param; String value = ""; if (pos > 0) { key = param.substring(0, pos); if ((pos + keyValLen) < param.length()) { value = param.substring(pos + keyValLen); } } params.put(key, value); } return params; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: splitAsMap File: src/org/opencms/util/CmsStringUtil.java Repository: alkacon/opencms-core The code follows secure coding practices.
[ "CWE-79" ]
CVE-2013-4600
MEDIUM
4.3
alkacon/opencms-core
splitAsMap
src/org/opencms/util/CmsStringUtil.java
72a05e3ea1cf692e2efce002687272e63f98c14a
0
Analyze the following code function for security vulnerabilities
public FormValidation doCheckURIEncoding(StaplerRequest request) throws IOException { // expected is non-ASCII String final String expected = "\u57f7\u4e8b"; final String value = fixEmpty(request.getParameter("value")); if (!expected.equals(value)) return FormValidation.warningWithMarkup(Messages.Hudson_NotUsesUTF8ToDecodeURL()); return FormValidation.ok(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doCheckURIEncoding 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
doCheckURIEncoding
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
public String getBuildNowText() { return AlternativeUiTextProvider.get(BUILD_NOW_TEXT,this,Messages.AbstractProject_BuildNow()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBuildNowText 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
getBuildNowText
core/src/main/java/hudson/model/AbstractProject.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public void finishInstrumentation(IApplicationThread target, int resultCode, Bundle results) throws RemoteException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: finishInstrumentation File: core/java/android/app/IActivityManager.java Repository: android The code follows secure coding practices.
[ "CWE-264" ]
CVE-2016-3832
HIGH
8.3
android
finishInstrumentation
core/java/android/app/IActivityManager.java
e7cf91a198de995c7440b3b64352effd2e309906
0
Analyze the following code function for security vulnerabilities
public @NonNull List<Pair<PasspointProvider, PasspointMatch>> getAllMatchedProviders( ScanResult scanResult) { return getAllMatchedProviders(scanResult, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getAllMatchedProviders File: service/java/com/android/server/wifi/hotspot2/PasspointManager.java Repository: android The code follows secure coding practices.
[ "CWE-120" ]
CVE-2023-21243
MEDIUM
5.5
android
getAllMatchedProviders
service/java/com/android/server/wifi/hotspot2/PasspointManager.java
5b49b8711efaadadf5052ba85288860c2d7ca7a6
0
Analyze the following code function for security vulnerabilities
public static String stringForQuery(SQLiteDatabase db, String query, String[] selectionArgs) { SQLiteStatement prog = db.compileStatement(query); try { return stringForQuery(prog, selectionArgs); } finally { prog.close(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: stringForQuery File: core/java/android/database/DatabaseUtils.java Repository: android The code follows secure coding practices.
[ "CWE-502" ]
CVE-2023-40121
MEDIUM
5.5
android
stringForQuery
core/java/android/database/DatabaseUtils.java
3287ac2d2565dc96bf6177967f8e3aed33954253
0
Analyze the following code function for security vulnerabilities
private boolean isProcessStateForeground(int processState) { return processState <= PROCESS_STATE_FOREGROUND_THRESHOLD; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isProcessStateForeground 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
isProcessStateForeground
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
private PendingAssistExtras enqueueAssistContext(int requestType, Intent intent, String hint, IAssistDataReceiver receiver, Bundle receiverExtras, IBinder activityToken, boolean focused, boolean newSessionId, int userHandle, Bundle args, long timeout, int flags) { enforceCallingPermission(android.Manifest.permission.GET_TOP_ACTIVITY_INFO, "enqueueAssistContext()"); synchronized (this) { ActivityRecord activity = getFocusedStack().getTopActivity(); if (activity == null) { Slog.w(TAG, "getAssistContextExtras failed: no top activity"); return null; } if (activity.app == null || activity.app.thread == null) { Slog.w(TAG, "getAssistContextExtras failed: no process for " + activity); return null; } if (focused) { if (activityToken != null) { ActivityRecord caller = ActivityRecord.forTokenLocked(activityToken); if (activity != caller) { Slog.w(TAG, "enqueueAssistContext failed: caller " + caller + " is not current top " + activity); return null; } } } else { activity = ActivityRecord.forTokenLocked(activityToken); if (activity == null) { Slog.w(TAG, "enqueueAssistContext failed: activity for token=" + activityToken + " couldn't be found"); return null; } if (activity.app == null || activity.app.thread == null) { Slog.w(TAG, "enqueueAssistContext failed: no process for " + activity); return null; } } PendingAssistExtras pae; Bundle extras = new Bundle(); if (args != null) { extras.putAll(args); } extras.putString(Intent.EXTRA_ASSIST_PACKAGE, activity.packageName); extras.putInt(Intent.EXTRA_ASSIST_UID, activity.app.uid); pae = new PendingAssistExtras(activity, extras, intent, hint, receiver, receiverExtras, userHandle); pae.isHome = activity.isActivityTypeHome(); // Increment the sessionId if necessary if (newSessionId) { mViSessionId++; } try { activity.app.thread.requestAssistContextExtras(activity.appToken, pae, requestType, mViSessionId, flags); mPendingAssistExtras.add(pae); mUiHandler.postDelayed(pae, timeout); } catch (RemoteException e) { Slog.w(TAG, "getAssistContextExtras failed: crash calling " + activity); return null; } return pae; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: enqueueAssistContext 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
enqueueAssistContext
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public void setPrettyPrint(String prettyPrint) { this.prettyPrint = prettyPrint; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setPrettyPrint File: base/common/src/main/java/com/netscape/certsrv/cert/CertData.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
setPrettyPrint
base/common/src/main/java/com/netscape/certsrv/cert/CertData.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
public void setContactInfo(final String userId, final ContactType contactType, final String contactValue) throws Exception { update(); m_writeLock.lock(); try { final User user = _getUser(userId); if (user != null) { _setContact(user, contactType, contactValue); } _saveCurrent(); } finally { m_writeLock.unlock(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setContactInfo 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
setContactInfo
opennms-config/src/main/java/org/opennms/netmgt/config/UserManager.java
607151ea8f90212a3fb37c977fa57c7d58d26a84
0
Analyze the following code function for security vulnerabilities
@Override public boolean deselect(final Collection<?> itemIds) throws IllegalArgumentException { return deselect(itemIds, true); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deselect 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
deselect
server/src/main/java/com/vaadin/ui/Grid.java
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
0
Analyze the following code function for security vulnerabilities
private boolean verifyManifestDigest( ManifestParser.Section sfMainSection, boolean createdBySigntool, byte[] manifestBytes, int minSdkVersion, int maxSdkVersion) throws NoSuchAlgorithmException { Collection<NamedDigest> expectedDigests = getDigestsToVerify( sfMainSection, ((createdBySigntool) ? "-Digest" : "-Digest-Manifest"), minSdkVersion, maxSdkVersion); boolean digestFound = !expectedDigests.isEmpty(); if (!digestFound) { mResult.addWarning( Issue.JAR_SIG_NO_MANIFEST_DIGEST_IN_SIG_FILE, mSignatureFileEntry.getName()); return false; } boolean verified = true; for (NamedDigest expectedDigest : expectedDigests) { String jcaDigestAlgorithm = expectedDigest.jcaDigestAlgorithm; byte[] actual = digest(jcaDigestAlgorithm, manifestBytes); byte[] expected = expectedDigest.digest; if (!Arrays.equals(expected, actual)) { mResult.addWarning( Issue.JAR_SIG_ZIP_ENTRY_DIGEST_DID_NOT_VERIFY, V1SchemeConstants.MANIFEST_ENTRY_NAME, jcaDigestAlgorithm, mSignatureFileEntry.getName(), Base64.getEncoder().encodeToString(actual), Base64.getEncoder().encodeToString(expected)); verified = false; } } return verified; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: verifyManifestDigest File: src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java Repository: android The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-21253
MEDIUM
5.5
android
verifyManifestDigest
src/main/java/com/android/apksig/internal/apk/v1/V1SchemeVerifier.java
41d882324288085fd32ae0bb70dc85f5fd0e2be7
0
Analyze the following code function for security vulnerabilities
private void flushChannel(StreamSinkChannel stream) throws IOException { stream.shutdownWrites(); if (!stream.flush()) { stream.getWriteSetter().set(ChannelListeners.flushingChannelListener(null, writeExceptionHandler())); stream.resumeWrites(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: flushChannel File: core/src/main/java/io/undertow/protocols/http2/Http2Channel.java Repository: undertow-io/undertow The code follows secure coding practices.
[ "CWE-214" ]
CVE-2021-3859
HIGH
7.5
undertow-io/undertow
flushChannel
core/src/main/java/io/undertow/protocols/http2/Http2Channel.java
e43f0ada3f4da6e8579e0020cec3cb1a81e487c2
0
Analyze the following code function for security vulnerabilities
private static String lowerCaseHostname(String redirectUri) { int n = redirectUri.indexOf('/', 7); if (n == -1) { return redirectUri.toLowerCase(); } else { return redirectUri.substring(0, n).toLowerCase() + redirectUri.substring(n); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: lowerCaseHostname File: services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java Repository: keycloak The code follows secure coding practices.
[ "CWE-79" ]
CVE-2022-4361
MEDIUM
6.1
keycloak
lowerCaseHostname
services/src/main/java/org/keycloak/protocol/oidc/utils/RedirectUtils.java
a1cfe6e24e5b34792699a00b8b4a8016a5929e3a
0
Analyze the following code function for security vulnerabilities
@Beta public static BufferedWriter newWriter(File file, Charset charset) throws FileNotFoundException { checkNotNull(file); checkNotNull(charset); return new BufferedWriter(new OutputStreamWriter(new FileOutputStream(file), charset)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newWriter File: android/guava/src/com/google/common/io/Files.java Repository: google/guava The code follows secure coding practices.
[ "CWE-732" ]
CVE-2020-8908
LOW
2.1
google/guava
newWriter
android/guava/src/com/google/common/io/Files.java
fec0dbc4634006a6162cfd4d0d09c962073ddf40
0
Analyze the following code function for security vulnerabilities
public int getXObjectSize(DocumentReference classReference) { try { return getXObjects().get(classReference).size(); } catch (Exception e) { return 0; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getXObjectSize 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
getXObjectSize
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
db3d1c62fc5fb59fefcda3b86065d2d362f55164
0
Analyze the following code function for security vulnerabilities
protected Object mapArray(JsonParser p, DeserializationContext ctxt, Collection<Object> result) throws IOException { // we start by pointing to START_ARRAY. Also, no real merging; array/Collection // just appends always while (p.nextToken() != JsonToken.END_ARRAY) { result.add(deserialize(p, ctxt)); } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: mapArray File: src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java Repository: FasterXML/jackson-databind The code follows secure coding practices.
[ "CWE-787" ]
CVE-2020-36518
MEDIUM
5
FasterXML/jackson-databind
mapArray
src/main/java/com/fasterxml/jackson/databind/deser/std/UntypedObjectDeserializer.java
8238ab41d0350fb915797c89d46777b4496b74fd
0
Analyze the following code function for security vulnerabilities
@Override public Route.Collection put(final String path1, final String path2, final String path3, final Route.ZeroArgHandler handler) { return new Route.Collection( new Route.Definition[]{put(path1, handler), put(path2, handler), put(path3, handler)}); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: put File: jooby/src/main/java/org/jooby/Jooby.java Repository: jooby-project/jooby The code follows secure coding practices.
[ "CWE-22" ]
CVE-2020-7647
MEDIUM
5
jooby-project/jooby
put
jooby/src/main/java/org/jooby/Jooby.java
34f526028e6cd0652125baa33936ffb6a8a4a009
0
Analyze the following code function for security vulnerabilities
private static String decodeContentFromQueryParam(String content) { try { return URLDecoder.decode(replacePlus(replacePercent(content)), UTF8_ENCODING_NAME); } catch (UnsupportedEncodingException e) { LogUtils.e(LOG_TAG, "%s while decoding '%s'", e.getMessage(), content); return ""; // Default to empty string so setText/setBody has same behavior as before. } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: decodeContentFromQueryParam File: src/com/android/mail/compose/ComposeActivity.java Repository: android The code follows secure coding practices.
[ "CWE-200" ]
CVE-2016-2425
MEDIUM
4.3
android
decodeContentFromQueryParam
src/com/android/mail/compose/ComposeActivity.java
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
0
Analyze the following code function for security vulnerabilities
public static String getEltText(Element element) { try { NodeList childNodeList = element.getChildNodes(); if (childNodeList.getLength() == 0) return ""; return childNodeList.item(0).getNodeValue(); } catch (Exception e) { log.warning("Exception e=" + e.getMessage() + " thrown calling getEltText on element=" + element); } return ""; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getEltText File: src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-3878
HIGH
7.5
stanfordnlp/CoreNLP
getEltText
src/edu/stanford/nlp/semgraph/semgrex/ssurgeon/Ssurgeon.java
e5bbe135a02a74b952396751ed3015e8b8252e99
0
Analyze the following code function for security vulnerabilities
private QuickSearchPanel newQuickSearchPanel(String id, ModalPanel modal) { return new QuickSearchPanel(id, projectModel, new AbstractReadOnlyModel<String>() { @Override public String getObject() { return state.blobIdent.revision; } }) { @Override protected void onSelect(AjaxRequestTarget target, QueryHit hit) { BlobIdent selected = new BlobIdent(state.blobIdent.revision, hit.getBlobPath(), FileMode.REGULAR_FILE.getBits()); ProjectBlobPage.this.onSelect(target, selected, SourceRendererProvider.getPosition(hit.getTokenPos())); modal.close(); } @Override protected void onMoreQueried(AjaxRequestTarget target, List<QueryHit> hits) { newSearchResult(target, hits); resizeWindow(target); modal.close(); } @Override protected void onCancel(AjaxRequestTarget target) { modal.close(); } }; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: newQuickSearchPanel File: server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-434" ]
CVE-2021-21245
HIGH
7.5
theonedev/onedev
newQuickSearchPanel
server-core/src/main/java/io/onedev/server/web/page/project/blob/ProjectBlobPage.java
0c060153fb97c0288a1917efdb17cc426934dacb
0
Analyze the following code function for security vulnerabilities
@Override public Response service(Command command) { MDC.put("activemq.connector", connector.getUri().toString()); Response response = null; boolean responseRequired = command.isResponseRequired(); int commandId = command.getCommandId(); try { if (!pendingStop) { response = command.visit(this); } else { response = new ExceptionResponse(this.stopError); } } catch (Throwable e) { if (SERVICELOG.isDebugEnabled() && e.getClass() != BrokerStoppedException.class) { SERVICELOG.debug("Error occured while processing " + (responseRequired ? "sync" : "async") + " command: " + command + ", exception: " + e, e); } if (e instanceof SuppressReplyException || (e.getCause() instanceof SuppressReplyException)) { LOG.info("Suppressing reply to: " + command + " on: " + e + ", cause: " + e.getCause()); responseRequired = false; } if (responseRequired) { if (e instanceof SecurityException || e.getCause() instanceof SecurityException) { SERVICELOG.warn("Security Error occurred: {}", e.getMessage()); } response = new ExceptionResponse(e); } else { serviceException(e); } } if (responseRequired) { if (response == null) { response = new Response(); } response.setCorrelationId(commandId); } // The context may have been flagged so that the response is not // sent. if (context != null) { if (context.isDontSendReponse()) { context.setDontSendReponse(false); response = null; } context = null; } MDC.remove("activemq.connector"); return response; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: service File: activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java Repository: apache/activemq The code follows secure coding practices.
[ "CWE-264" ]
CVE-2014-3576
MEDIUM
5
apache/activemq
service
activemq-broker/src/main/java/org/apache/activemq/broker/TransportConnection.java
00921f2
0
Analyze the following code function for security vulnerabilities
@Override public void beginListItem(Map<String, String> parameters) { getXHTMLWikiPrinter().printXMLStartElement("li", parameters); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: beginListItem File: xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java Repository: xwiki/xwiki-rendering The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-32070
MEDIUM
6.1
xwiki/xwiki-rendering
beginListItem
xwiki-rendering-syntaxes/xwiki-rendering-syntax-xhtml/src/main/java/org/xwiki/rendering/internal/renderer/xhtml/XHTMLChainingRenderer.java
c40e2f5f9482ec6c3e71dbf1fff5ba8a5e44cdc1
0
Analyze the following code function for security vulnerabilities
@Override public void hideInsets(@InsetsType int types, boolean fromIme) { try { mClient.hideInsets(types, fromIme); } catch (RemoteException e) { Slog.w(TAG, "Failed to deliver showInsets", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hideInsets 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
hideInsets
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
private void doKeyguardLaterForChildProfilesLocked() { UserManager um = UserManager.get(mContext); for (int profileId : um.getEnabledProfileIds(UserHandle.myUserId())) { if (mLockPatternUtils.isSeparateProfileChallengeEnabled(profileId)) { long userTimeout = getLockTimeout(profileId); if (userTimeout == 0) { doKeyguardForChildProfilesLocked(); } else { long userWhen = SystemClock.elapsedRealtime() + userTimeout; Intent lockIntent = new Intent(DELAYED_LOCK_PROFILE_ACTION); lockIntent.setPackage(mContext.getPackageName()); lockIntent.putExtra("seq", mDelayedProfileShowingSequence); lockIntent.putExtra(Intent.EXTRA_USER_ID, profileId); lockIntent.addFlags(Intent.FLAG_RECEIVER_FOREGROUND); PendingIntent lockSender = PendingIntent.getBroadcast( mContext, 0, lockIntent, PendingIntent.FLAG_CANCEL_CURRENT | PendingIntent.FLAG_IMMUTABLE); mAlarmManager.setExactAndAllowWhileIdle(AlarmManager.ELAPSED_REALTIME_WAKEUP, userWhen, lockSender); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doKeyguardLaterForChildProfilesLocked 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
doKeyguardLaterForChildProfilesLocked
packages/SystemUI/src/com/android/systemui/keyguard/KeyguardViewMediator.java
d18d8b350756b0e89e051736c1f28744ed31e93a
0
Analyze the following code function for security vulnerabilities
public static Element ensureLogisimCompatibility(Element elt) { Map<String, String> validLabels; validLabels = findValidLabels(elt, "circuit", "name"); applyValidLabels(elt, "circuit", "name", validLabels); validLabels = findValidLabels(elt, "circuit", "label"); applyValidLabels(elt, "circuit", "label", validLabels); validLabels = findValidLabels(elt, "comp", "label"); applyValidLabels(elt, "comp", "label", validLabels); // In old, buggy Logisim versions, labels where incorrectly // stored also in toolbar and lib components. If this is the // case, clean them up. fixInvalidToolbarLib(elt); return (elt); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: ensureLogisimCompatibility File: src/com/cburch/logisim/file/XmlReader.java Repository: logisim-evolution The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000889
MEDIUM
6.8
logisim-evolution
ensureLogisimCompatibility
src/com/cburch/logisim/file/XmlReader.java
90aee8f8ceef463884cc400af4f6d1f109fb0972
0
Analyze the following code function for security vulnerabilities
public Descriptor<RetentionStrategy<?>> getRetentionStrategy(String shortClassName) { return findDescriptor(shortClassName, RetentionStrategy.all()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRetentionStrategy 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
getRetentionStrategy
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
@Override public int getPasswordMinimumNumeric(ComponentName who, int userHandle, boolean parent) { return getStrictestPasswordRequirement(who, userHandle, parent, admin -> admin.mPasswordPolicy.numeric, PASSWORD_QUALITY_COMPLEX); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getPasswordMinimumNumeric 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
getPasswordMinimumNumeric
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
ed3f25b7222d4cff471f2b7d22d1150348146957
0
Analyze the following code function for security vulnerabilities
@Override public String getUrl() { String currDomain = SaManager.getConfig().getCurrDomain(); if( ! SaFoxUtil.isEmpty(currDomain)) { return currDomain + this.getRequestPath(); } return request.getRequestURL().toString(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getUrl File: sa-token-starter/sa-token-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java Repository: dromara/Sa-Token The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-44794
CRITICAL
9.8
dromara/Sa-Token
getUrl
sa-token-starter/sa-token-servlet/src/main/java/cn/dev33/satoken/servlet/model/SaRequestForServlet.java
954efeb73277f924f836da2a25322ea35ee1bfa3
0
Analyze the following code function for security vulnerabilities
private <T> T doAddApplication(ServiceProvider serviceProvider, String tenantDomain, String username, ApplicationPersistFunction<ServiceProvider, T> applicationPersistFunction) throws IdentityApplicationManagementException { try { startTenantFlow(tenantDomain, username); String applicationName = serviceProvider.getApplicationName(); // First we need to create a role with the application name. Only the users in this role will be able to // edit/update the application. ApplicationMgtUtil.createAppRole(applicationName, username); try { PermissionsAndRoleConfig permissionAndRoleConfig = serviceProvider.getPermissionAndRoleConfig(); ApplicationMgtUtil.storePermissions(applicationName, username, permissionAndRoleConfig); } catch (IdentityApplicationManagementException ex) { if (log.isDebugEnabled()) { log.debug("Creating application: " + applicationName + " in tenantDomain: " + tenantDomain + " failed. Rolling back by cleaning up partially created data."); } deleteApplicationRole(applicationName); throw ex; } try { return applicationPersistFunction.persistApplication(serviceProvider, tenantDomain); } catch (IdentityApplicationManagementException ex) { if (isRollbackRequired(ex)) { if (log.isDebugEnabled()) { log.debug("Creating application: " + applicationName + " in tenantDomain: " + tenantDomain + " failed. Rolling back by cleaning up partially created data."); } deleteApplicationRole(applicationName); deleteApplicationPermission(applicationName); } throw ex; } } finally { endTenantFlow(); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doAddApplication File: components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java Repository: wso2/carbon-identity-framework The code follows secure coding practices.
[ "CWE-611" ]
CVE-2021-42646
MEDIUM
6.4
wso2/carbon-identity-framework
doAddApplication
components/application-mgt/org.wso2.carbon.identity.application.mgt/src/main/java/org/wso2/carbon/identity/application/mgt/ApplicationManagementServiceImpl.java
e9119883ee02a884f3c76c7bbc4022a4f4c58fc0
0
Analyze the following code function for security vulnerabilities
private static byte[] toUtf8Bytes(String str) { try { return str.getBytes("UTF-8"); } catch(UnsupportedEncodingException e) { throw new IllegalStateException("The Java spec requires UTF-8 support.", e); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toUtf8Bytes File: src/main/java/org/owasp/esapi/codecs/PercentCodec.java Repository: ESAPI/esapi-java-legacy The code follows secure coding practices.
[ "CWE-310" ]
CVE-2013-5960
MEDIUM
5.8
ESAPI/esapi-java-legacy
toUtf8Bytes
src/main/java/org/owasp/esapi/codecs/PercentCodec.java
b7cbc53f9cc967cf1a5a9463d8c6fef9ed6ef4f7
0
Analyze the following code function for security vulnerabilities
protected B decoupleCloseAndGoAway(boolean decoupleCloseAndGoAway) { this.decoupleCloseAndGoAway = decoupleCloseAndGoAway; return self(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: decoupleCloseAndGoAway File: codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java Repository: netty The code follows secure coding practices.
[ "CWE-400" ]
CVE-2023-44487
HIGH
7.5
netty
decoupleCloseAndGoAway
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
58f75f665aa81a8cbcf6ffa74820042a285c5e61
0
Analyze the following code function for security vulnerabilities
@Override public PendingIntent getRunningServiceControlPanel(ComponentName name) { enforceNotIsolatedCaller("getRunningServiceControlPanel"); synchronized (this) { return mServices.getRunningServiceControlPanelLocked(name); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRunningServiceControlPanel 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
getRunningServiceControlPanel
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
private static List<Element> getTagElementsFromFileSAXException( File f, String tag) throws SAXException { List<Element> sents = Generics.newArrayList(); try { DocumentBuilderFactory dbf = safeDocumentBuilderFactory(); DocumentBuilder db = dbf.newDocumentBuilder(); Document doc = db.parse(f); doc.getDocumentElement().normalize(); NodeList nodeList=doc.getElementsByTagName(tag); for (int i = 0; i < nodeList.getLength(); i++) { // Get element Element element = (Element)nodeList.item(i); sents.add(element); } } catch (IOException | ParserConfigurationException e) { log.warn(e); } return sents; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getTagElementsFromFileSAXException File: src/edu/stanford/nlp/util/XMLUtils.java Repository: stanfordnlp/CoreNLP The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-0239
HIGH
7.5
stanfordnlp/CoreNLP
getTagElementsFromFileSAXException
src/edu/stanford/nlp/util/XMLUtils.java
1940ffb938dc4f3f5bc5f2a2fd8b35aabbbae3dd
0
Analyze the following code function for security vulnerabilities
public Object clone() { Commandline c = new Commandline( (Shell) shell.clone() ); c.executable = executable; c.workingDir = workingDir; c.addArguments( getArguments() ); return c; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: clone File: src/main/java/org/codehaus/plexus/util/cli/Commandline.java Repository: codehaus-plexus/plexus-utils The code follows secure coding practices.
[ "CWE-78" ]
CVE-2017-1000487
HIGH
7.5
codehaus-plexus/plexus-utils
clone
src/main/java/org/codehaus/plexus/util/cli/Commandline.java
b38a1b3a4352303e4312b2bb601a0d7ec6e28f41
0
Analyze the following code function for security vulnerabilities
public String getOrgUnit() { return orgUnit; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getOrgUnit File: base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getOrgUnit
base/common/src/main/java/com/netscape/certsrv/cert/CertSearchRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override public double toDouble() { // If this assertion fails, you need to call roundToInfinity() or some other rounding method. // See the comment at the top of this file explaining the "isApproximate" field. assert !isApproximate; if (isNaN()) { return Double.NaN; } else if (isInfinite()) { return isNegative() ? Double.NEGATIVE_INFINITY : Double.POSITIVE_INFINITY; } // TODO: Do like in C++ and use a library function to perform this conversion? // This code is not as hot in Java because .parse() returns a BigDecimal, not a double. long tempLong = 0L; int lostDigits = precision - Math.min(precision, 17); for (int shift = precision - 1; shift >= lostDigits; shift--) { tempLong = tempLong * 10 + getDigitPos(shift); } double result = tempLong; int _scale = scale + lostDigits; if (_scale >= 0) { // 1e22 is the largest exact double. int i = _scale; for (; i >= 22; i -= 22) { result *= 1e22; if (Double.isInfinite(result)) { // Further multiplications will not be productive. i = 0; break; } } result *= DOUBLE_MULTIPLIERS[i]; } else { // 1e22 is the largest exact double. int i = _scale; for (; i <= -22; i += 22) { result /= 1e22; if (result == 0.0) { // Further divisions will not be productive. i = 0; break; } } result /= DOUBLE_MULTIPLIERS[-i]; } if (isNegative()) { result = -result; } return result; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toDouble File: icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java Repository: unicode-org/icu The code follows secure coding practices.
[ "CWE-190" ]
CVE-2018-18928
HIGH
7.5
unicode-org/icu
toDouble
icu4j/main/classes/core/src/com/ibm/icu/impl/number/DecimalQuantity_AbstractBCD.java
53d8c8f3d181d87a6aa925b449b51c4a2c922a51
0
Analyze the following code function for security vulnerabilities
private void handleConnectionAttemptEndForDiagnostics(int level2FailureCode) { switch (level2FailureCode) { case WifiMetrics.ConnectionEvent.FAILURE_NONE: break; case WifiMetrics.ConnectionEvent.FAILURE_CONNECT_NETWORK_FAILED: // WifiDiagnostics doesn't care about pre-empted connections, or cases // where we failed to initiate a connection attempt with supplicant. break; default: removeMessages(CMD_DIAGS_CONNECT_TIMEOUT); mWifiDiagnostics.reportConnectionEvent(WifiDiagnostics.CONNECTION_EVENT_FAILED, mClientModeManager); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handleConnectionAttemptEndForDiagnostics File: service/java/com/android/server/wifi/ClientModeImpl.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21242
CRITICAL
9.8
android
handleConnectionAttemptEndForDiagnostics
service/java/com/android/server/wifi/ClientModeImpl.java
72e903f258b5040b8f492cf18edd124b5a1ac770
0
Analyze the following code function for security vulnerabilities
public static HgMaterial hgMaterial(String url, String folder) { final HgMaterial material = new HgMaterial(url, folder); material.setAutoUpdate(true); return material; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hgMaterial File: domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java Repository: gocd The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-39309
MEDIUM
6.5
gocd
hgMaterial
domain/src/test/java/com/thoughtworks/go/helper/MaterialsMother.java
691b479f1310034992da141760e9c5d1f5b60e8a
0
Analyze the following code function for security vulnerabilities
@Override public String getCookieValue(String name) { HttpCookie cookie = request.getCookies().getFirst(name); if(cookie == null) { return null; } return cookie.getValue(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getCookieValue File: sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java Repository: dromara/Sa-Token The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-44794
CRITICAL
9.8
dromara/Sa-Token
getCookieValue
sa-token-starter/sa-token-reactor-spring-boot3-starter/src/main/java/cn/dev33/satoken/reactor/model/SaRequestForReactor.java
954efeb73277f924f836da2a25322ea35ee1bfa3
0
Analyze the following code function for security vulnerabilities
@Override public void writeActivitiesToProto(ProtoOutputStream proto) { synchronized (mGlobalLock) { // The output proto of "activity --proto activities" mRootWindowContainer.dumpDebug( proto, ROOT_WINDOW_CONTAINER, WindowTraceLogLevel.ALL); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeActivitiesToProto 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
writeActivitiesToProto
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
public static void unpackPackage(Class<?> base, String pkgname, File dir) throws FileNotFoundException, IOException { String[] sa = getResourceList(base, pkgname, null); for (String s : sa) { E.info("resource to unpack " + s); } for (String s : sa) { File fdest = new File(dir, s); extractRelativeResource(base, pkgname + "/" + s, fdest); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: unpackPackage File: src/main/java/org/lemsml/jlems/io/util/JUtil.java Repository: LEMS/jLEMS The code follows secure coding practices.
[ "CWE-22" ]
CVE-2022-4583
HIGH
8.8
LEMS/jLEMS
unpackPackage
src/main/java/org/lemsml/jlems/io/util/JUtil.java
8c224637d7d561076364a9e3c2c375daeaf463dc
0
Analyze the following code function for security vulnerabilities
public String getReason() { return reason; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getReason File: base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java Repository: dogtagpki/pki The code follows secure coding practices.
[ "CWE-611" ]
CVE-2022-2414
HIGH
7.5
dogtagpki/pki
getReason
base/common/src/main/java/com/netscape/certsrv/cert/CertRevokeRequest.java
16deffdf7548e305507982e246eb9fd1eac414fd
0
Analyze the following code function for security vulnerabilities
@Override public void setLocale(Locale locale) { super.setLocale(locale); this.setText("application.title"); this.setText("application.language.name"); this.setText("page.search.title"); this.setText("page.welcome.caption"); this.setText("page.language-setting.title"); this.setText("page.logout.caption"); this.setText("page.reading.title"); this.setText("navigator.bible.caption"); this.setText("navigator.video.caption"); this.setText("navigator.document.caption"); this.setText("navigator.reader.caption"); this.setText("navigator.controller.caption"); this.setText("navigator.help.caption"); this.setText("holy.book.forward"); this.setText("holy.book.previous"); this.setText("holy.book.next"); this.setText("holy.book.find-and-reading"); this.setText("holy.book.tools"); this.setText("holy.book.select"); this.setText("holy.bible"); this.setText("holy.bible.old-testament"); this.setText("holy.bible.new-testament"); this.setText("footer.report-a-site-bug"); this.setText("footer.privacy"); this.setText("footer.register"); this.setText("footer.api"); this.setText("footer.updates-rss"); this.setText("search.confirm.caption"); this.setText("search.submit.caption"); this.setText("search.strict.mode"); this.setText("search.advanced.mode"); this.setText("invite.confirm.caption"); this.setText("invite.submit.caption"); this.setText("subscribe.plan"); this.setText("subscribe.bible.plan"); this.setText("subscribe.article.plan"); this.setText("subscribe.submit.caption"); this.setText("subscribe.email.caption"); this.setText("user.lastlogin.caption"); this.setText("holy.bible.download"); this.setText("holy.bible.chinese.download"); this.setText("search.info", 0, 0, "", 0); String username = ""; if (this.getVariable("username") != null) { username = String.valueOf(this.getVariable("username").getValue()); } this.setText("page.welcome.hello", (username == null || username.trim() .length() == 0) ? "" : username + ","); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setLocale File: src/main/java/custom/application/search.java Repository: m0ver/bible-online The code follows secure coding practices.
[ "CWE-89" ]
CVE-2022-4454
CRITICAL
9.8
m0ver/bible-online
setLocale
src/main/java/custom/application/search.java
6ef0aabfb2d4ccd53fcaa9707781303af357410e
0
Analyze the following code function for security vulnerabilities
protected void setDefaultClassLoader() { try { setClassLoader( VaadinServiceClassLoaderUtil.findDefaultClassLoader()); } catch (SecurityException e) { getLogger().error(CANNOT_ACQUIRE_CLASSLOADER_SEVERE, e); throw e; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setDefaultClassLoader File: flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java Repository: vaadin/flow The code follows secure coding practices.
[ "CWE-203" ]
CVE-2021-31404
LOW
1.9
vaadin/flow
setDefaultClassLoader
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
621ef1b322737d963bee624b2d2e38cd739903d9
0
Analyze the following code function for security vulnerabilities
boolean checkAppSwitchAllowedLocked(int sourcePid, int sourceUid, int callingPid, int callingUid, String name) { if (mAppSwitchesAllowedTime < SystemClock.uptimeMillis()) { return true; } int perm = checkComponentPermission( android.Manifest.permission.STOP_APP_SWITCHES, sourcePid, sourceUid, -1, true); if (perm == PackageManager.PERMISSION_GRANTED) { return true; } // If the actual IPC caller is different from the logical source, then // also see if they are allowed to control app switches. if (callingUid != -1 && callingUid != sourceUid) { perm = checkComponentPermission( android.Manifest.permission.STOP_APP_SWITCHES, callingPid, callingUid, -1, true); if (perm == PackageManager.PERMISSION_GRANTED) { return true; } } Slog.w(TAG, name + " request from " + sourceUid + " stopped"); return false; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkAppSwitchAllowedLocked File: services/core/java/com/android/server/am/ActivityManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-284" ]
CVE-2015-3833
MEDIUM
4.3
android
checkAppSwitchAllowedLocked
services/core/java/com/android/server/am/ActivityManagerService.java
aaa0fee0d7a8da347a0c47cef5249c70efee209e
0
Analyze the following code function for security vulnerabilities
private void setupWindowForRemoveOnExit() { mRemoveOnExit = true; setDisplayLayoutNeeded(); getDisplayContent().getDisplayPolicy().removeWindowLw(this); // Request a focus update as this window's input channel is already gone. Otherwise // we could have no focused window in input manager. final boolean focusChanged = mWmService.updateFocusedWindowLocked( UPDATE_FOCUS_WILL_PLACE_SURFACES, false /*updateInputWindows*/); mWmService.mWindowPlacerLocked.performSurfacePlacement(); if (focusChanged) { getDisplayContent().getInputMonitor().updateInputWindowsLw(false /*force*/); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: setupWindowForRemoveOnExit 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
setupWindowForRemoveOnExit
services/core/java/com/android/server/wm/WindowState.java
7428962d3b064ce1122809d87af65099d1129c9e
0
Analyze the following code function for security vulnerabilities
private void migrate2(File dataDir, Stack<Integer> versions) { for (File file: dataDir.listFiles()) { if (file.getName().startsWith("Depots.xml")) { VersionedXmlDoc dom = VersionedXmlDoc.fromFile(file); for (Element element: dom.getRootElement().elements()) { Element gateKeeperElement = element.element("gateKeeper"); gateKeeperElement.detach(); element.addElement("gateKeepers"); } dom.writeToFile(file, false); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrate2 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
migrate2
server-core/src/main/java/io/onedev/server/migration/DataMigrator.java
d67dd9686897fe5e4ab881d749464aa7c06a68e5
0
Analyze the following code function for security vulnerabilities
public static NSObject parse(Document doc) throws PropertyListFormatException, IOException, ParseException { DocumentType docType = doc.getDoctype(); if (docType == null) { if (!doc.getDocumentElement().getNodeName().equals("plist")) { throw new UnsupportedOperationException("The given XML document is not a property list."); } } else if (!docType.getName().equals("plist")) { throw new UnsupportedOperationException("The given XML document is not a property list."); } Node rootNode; if (doc.getDocumentElement().getNodeName().equals("plist")) { //Root element wrapped in plist tag List<Node> rootNodes = filterElementNodes(doc.getDocumentElement().getChildNodes()); if (rootNodes.isEmpty()) { throw new PropertyListFormatException("The given XML property list has no root element!"); } else if (rootNodes.size() == 1) { rootNode = rootNodes.get(0); } else { throw new PropertyListFormatException("The given XML property list has more than one root element!"); } } else { //Root NSObject not wrapped in plist-tag rootNode = doc.getDocumentElement(); } return parseObject(rootNode); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parse File: src/main/java/com/dd/plist/XMLPropertyListParser.java Repository: 3breadt/dd-plist The code follows secure coding practices.
[ "CWE-611" ]
CVE-2016-15026
MEDIUM
4.3
3breadt/dd-plist
parse
src/main/java/com/dd/plist/XMLPropertyListParser.java
8c954e8d9f6f6863729e50105a8abf3f87fff74c
0
Analyze the following code function for security vulnerabilities
public String[] listFilesystemRoots() { if(!checkForPermission(Manifest.permission.READ_EXTERNAL_STORAGE, "This is required to browse the file system")){ return new String[]{}; } String [] storageDirs = getStorageDirectories(); if(storageDirs != null){ String [] roots = new String[storageDirs.length + 1]; System.arraycopy(storageDirs, 0, roots, 0, storageDirs.length); roots[roots.length - 1] = addFile(Environment.getRootDirectory().getAbsolutePath()); return roots; } return new String[]{addFile(Environment.getRootDirectory().getAbsolutePath())}; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: listFilesystemRoots File: Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java Repository: codenameone/CodenameOne The code follows secure coding practices.
[ "CWE-668" ]
CVE-2022-4903
MEDIUM
5.1
codenameone/CodenameOne
listFilesystemRoots
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
dad49c9ef26a598619fc48d2697151a02987d478
0
Analyze the following code function for security vulnerabilities
static void writeMessageTo( Message message, Map<FieldDescriptor, Object> fields, CodedOutputStream output, boolean alwaysWriteRequiredFields) throws IOException { final boolean isMessageSet = message.getDescriptorForType().getOptions().getMessageSetWireFormat(); if (alwaysWriteRequiredFields) { fields = new TreeMap<FieldDescriptor, Object>(fields); for (final FieldDescriptor field : message.getDescriptorForType().getFields()) { if (field.isRequired() && !fields.containsKey(field)) { fields.put(field, message.getField(field)); } } } for (final Map.Entry<Descriptors.FieldDescriptor, Object> entry : fields.entrySet()) { final Descriptors.FieldDescriptor field = entry.getKey(); final Object value = entry.getValue(); if (isMessageSet && field.isExtension() && field.getType() == Descriptors.FieldDescriptor.Type.MESSAGE && !field.isRepeated()) { output.writeMessageSetExtension(field.getNumber(), (Message) value); } else { FieldSet.writeField(field, value, output); } } final UnknownFieldSet unknownFields = message.getUnknownFields(); if (isMessageSet) { unknownFields.writeAsMessageSetTo(output); } else { unknownFields.writeTo(output); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: writeMessageTo File: java/core/src/main/java/com/google/protobuf/MessageReflection.java Repository: protocolbuffers/protobuf The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2022-3509
HIGH
7.5
protocolbuffers/protobuf
writeMessageTo
java/core/src/main/java/com/google/protobuf/MessageReflection.java
a3888f53317a8018e7a439bac4abeb8f3425d5e9
0
Analyze the following code function for security vulnerabilities
public void createConference(final Call call, final CreateConnectionResponse response) { Log.d(this, "createConference(%s) via %s.", call, getComponentName()); BindCallback callback = new BindCallback() { @Override public void onSuccess() { String callId = mCallIdMapper.getCallId(call); mPendingResponses.put(callId, response); Bundle extras = call.getIntentExtras(); if (extras == null) { extras = new Bundle(); } extras.putString(Connection.EXTRA_ORIGINAL_CONNECTION_ID, callId); Log.addEvent(call, LogUtils.Events.START_CONFERENCE, Log.piiHandle(call.getHandle())); ConnectionRequest connectionRequest = new ConnectionRequest.Builder() .setAccountHandle(call.getTargetPhoneAccount()) .setAddress(call.getHandle()) .setExtras(extras) .setVideoState(call.getVideoState()) .setTelecomCallId(callId) // For self-managed incoming calls, if there is another ongoing call Telecom // is responsible for showing a UI to ask the user if they'd like to answer // this new incoming call. .setShouldShowIncomingCallUi( !mCallsManager.shouldShowSystemIncomingCallUi(call)) .setRttPipeFromInCall(call.getInCallToCsRttPipeForCs()) .setRttPipeToInCall(call.getCsToInCallRttPipeForCs()) .setParticipants(call.getParticipants()) .setIsAdhocConferenceCall(call.isAdhocConferenceCall()) .build(); try { mServiceInterface.createConference( call.getConnectionManagerPhoneAccount(), callId, connectionRequest, call.shouldAttachToExistingConnection(), call.isUnknown(), Log.getExternalSession(TELECOM_ABBREVIATION)); } catch (RemoteException e) { Log.e(this, e, "Failure to createConference -- %s", getComponentName()); mPendingResponses.remove(callId).handleCreateConferenceFailure( new DisconnectCause(DisconnectCause.ERROR, e.toString())); } } @Override public void onFailure() { Log.e(this, new Exception(), "Failure to conference %s", getComponentName()); response.handleCreateConferenceFailure(new DisconnectCause(DisconnectCause.ERROR)); } }; mBinder.bind(callback, call); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createConference File: src/com/android/server/telecom/ConnectionServiceWrapper.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-21283
MEDIUM
5.5
android
createConference
src/com/android/server/telecom/ConnectionServiceWrapper.java
9b41a963f352fdb3da1da8c633d45280badfcb24
0
Analyze the following code function for security vulnerabilities
@Override public void registerUidObserver(IUidObserver observer, int which, int cutpoint, String callingPackage) { if (!hasUsageStatsPermission(callingPackage)) { enforceCallingPermission(android.Manifest.permission.PACKAGE_USAGE_STATS, "registerUidObserver"); } synchronized (this) { mUidObservers.register(observer, new UidObserverRegistration(Binder.getCallingUid(), callingPackage, which, cutpoint)); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: registerUidObserver 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
registerUidObserver
services/core/java/com/android/server/am/ActivityManagerService.java
962fb40991f15be4f688d960aa00073683ebdd20
0
Analyze the following code function for security vulnerabilities
public static void createParentDirs(File file) throws IOException { checkNotNull(file); File parent = file.getCanonicalFile().getParentFile(); if (parent == null) { /* * The given directory is a filesystem root. All zero of its ancestors exist. This doesn't * mean that the root itself exists -- consider x:\ on a Windows machine without such a drive * -- or even that the caller can create it, but this method makes no such guarantees even for * non-root files. */ return; } parent.mkdirs(); if (!parent.isDirectory()) { throw new IOException("Unable to create parent directories of " + file); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createParentDirs 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
createParentDirs
android/guava/src/com/google/common/io/Files.java
feb83a1c8fd2e7670b244d5afd23cba5aca43284
0
Analyze the following code function for security vulnerabilities
@RequiresFeature(PackageManager.FEATURE_SECURE_LOCK_SCREEN) public long getRequiredStrongAuthTimeout(@Nullable ComponentName admin) { return getRequiredStrongAuthTimeout(admin, myUserId()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getRequiredStrongAuthTimeout File: core/java/android/app/admin/DevicePolicyManager.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
getRequiredStrongAuthTimeout
core/java/android/app/admin/DevicePolicyManager.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
@SuppressWarnings({"unchecked"}) public <T> ExtensionList<T> getExtensionList(Class<T> extensionType) { return extensionLists.get(extensionType); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getExtensionList 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
getExtensionList
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
private static String serialize(Serializable obj) throws IOException { ByteArrayOutputStream bos = new ByteArrayOutputStream(); ObjectOutput out = null; try { out = new ObjectOutputStream(bos); out.writeObject(obj); byte[] objBytes = bos.toByteArray(); return Base64.encodeBytes(objBytes); } finally { try { if (out != null) { out.close(); } } catch (IOException ex) { ex.printStackTrace(); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: serialize File: common/src/main/java/org/keycloak/common/util/KerberosSerializationUtils.java Repository: keycloak The code follows secure coding practices.
[ "CWE-20" ]
CVE-2020-1714
MEDIUM
6.5
keycloak
serialize
common/src/main/java/org/keycloak/common/util/KerberosSerializationUtils.java
d5483d884de797e2ef6e69f92085bc10bf87e864
0
Analyze the following code function for security vulnerabilities
public static String getContentType(HttpHeaders headers) { // default to application/xml String contentType = MediaType.APPLICATION_XML_TYPE.toString(); // check variant that is based on accept header important in case of GET as then Content-Type might not be given Variant v = RestEasy960Util.getVariant(headers); if (v != null) { // set the default to selected variant contentType = v.getMediaType().toString(); } // now look for actual Content-Type header List<String> contentTypeHeader = headers.getRequestHeader(HttpHeaders.CONTENT_TYPE); if (contentTypeHeader != null && !contentTypeHeader.isEmpty() && contentTypeHeader.get(0) != null) { contentType = contentTypeHeader.get(0); } List<String> kieContentTypeHeader = headers.getRequestHeader(KieServerConstants.KIE_CONTENT_TYPE_HEADER); if (kieContentTypeHeader != null && !kieContentTypeHeader.isEmpty()) { contentType = kieContentTypeHeader.get(0); } return contentType; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getContentType File: kie-server-parent/kie-server-controller/kie-server-controller-rest/src/main/java/org/kie/server/controller/rest/ControllerUtils.java Repository: kiegroup/droolsjbpm-integration The code follows secure coding practices.
[ "CWE-260" ]
CVE-2016-7043
MEDIUM
5
kiegroup/droolsjbpm-integration
getContentType
kie-server-parent/kie-server-controller/kie-server-controller-rest/src/main/java/org/kie/server/controller/rest/ControllerUtils.java
e916032edd47aa46d15f3a11909b4804ee20a7e8
0
Analyze the following code function for security vulnerabilities
private String toClauses(final List<Criterion> criterion) { return IntStream.range(0, criterion.size()) .mapToObj(Integer::new) .map(position -> criterion.get(position).buildClauseString(position, getOperation())) .collect(Collectors.joining(AND)); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: toClauses File: src/main/java/uk/gov/hmcts/ccd/data/casedetails/search/SearchQueryFactoryOperation.java Repository: hmcts/ccd-data-store-api The code follows secure coding practices.
[ "CWE-89" ]
CVE-2019-15569
HIGH
7.5
hmcts/ccd-data-store-api
toClauses
src/main/java/uk/gov/hmcts/ccd/data/casedetails/search/SearchQueryFactoryOperation.java
c942d5ce847ab1b4acce8753320096e596b42c72
0
Analyze the following code function for security vulnerabilities
private void handlePackageChanged(String packageName, int packageUserId) { if (!isPackageInstalled(packageName, packageUserId)) { // Probably disabled, which is the same thing as uninstalled. handlePackageRemoved(packageName, packageUserId); return; } if (DEBUG || DEBUG_REBOOT) { Slog.d(TAG, String.format("handlePackageChanged: %s user=%d", packageName, packageUserId)); } // Activities may be disabled or enabled. Just rescan the package. synchronized (mLock) { final ShortcutUser user = getUserShortcutsLocked(packageUserId); user.rescanPackageIfNeeded(packageName, /* forceRescan=*/ true); } verifyStates(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: handlePackageChanged 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
handlePackageChanged
services/core/java/com/android/server/pm/ShortcutService.java
96e0524c48c6e58af7d15a2caf35082186fc8de2
0
Analyze the following code function for security vulnerabilities
@Override public T addObject(K name, Iterable<?> values) { for (Object value : values) { addObject(name, value); } return thisT(); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addObject File: codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java Repository: netty The code follows secure coding practices.
[ "CWE-436", "CWE-113" ]
CVE-2022-41915
MEDIUM
6.5
netty
addObject
codec/src/main/java/io/netty/handler/codec/DefaultHeaders.java
fe18adff1c2b333acb135ab779a3b9ba3295a1c4
0
Analyze the following code function for security vulnerabilities
private void decrementAppWidgetServiceRefCount(Widget widget) { Iterator<Pair<Integer, FilterComparison>> it = mRemoteViewsServicesAppWidgets .keySet().iterator(); while (it.hasNext()) { final Pair<Integer, FilterComparison> key = it.next(); final HashSet<Integer> ids = mRemoteViewsServicesAppWidgets.get(key); if (ids.remove(widget.appWidgetId)) { // If we have removed the last app widget referencing this service, then we // should destroy it and remove it from this set if (ids.isEmpty()) { destroyRemoteViewsService(key.second.getIntent(), widget); it.remove(); } } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: decrementAppWidgetServiceRefCount 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
decrementAppWidgetServiceRefCount
services/appwidget/java/com/android/server/appwidget/AppWidgetServiceImpl.java
0b98d304c467184602b4c6bce76fda0b0274bc07
0
Analyze the following code function for security vulnerabilities
private static String guessMimeTypeFromUri(final String uri) { final int questionmark = uri.indexOf('?', 1); // 1 => skip the initial / final int end = (questionmark > 0 ? questionmark : uri.length()) - 1; if (end < 5) { // Need at least: "/a.js" return null; } final char a = uri.charAt(end - 3); final char b = uri.charAt(end - 2); final char c = uri.charAt(end - 1); switch (uri.charAt(end)) { case 'g': return a == '.' && b == 'p' && c == 'n' ? "image/png" : null; case 'l': return a == 'h' && b == 't' && c == 'm' ? HTML_CONTENT_TYPE : null; case 's': if (a == '.' && b == 'c' && c == 's') { return "text/css"; } else if (b == '.' && c == 'j') { return "text/javascript"; } else { break; } case 'f': return a == '.' && b == 'g' && c == 'i' ? "image/gif" : null; case 'o': return a == '.' && b == 'i' && c == 'c' ? "image/x-icon" : null; } return null; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: guessMimeTypeFromUri File: src/tsd/HttpQuery.java Repository: OpenTSDB/opentsdb The code follows secure coding practices.
[ "CWE-79" ]
CVE-2023-25827
MEDIUM
6.1
OpenTSDB/opentsdb
guessMimeTypeFromUri
src/tsd/HttpQuery.java
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
0
Analyze the following code function for security vulnerabilities
private boolean isImage(MultipartFile file) { BufferedImage image = null; try (InputStream input = file.getInputStream()) { image = ImageIO.read(input); } catch (IOException e) { LogUtil.error(e.getMessage(), e); return false; } if (image == null || image.getWidth() <= 0 || image.getHeight() <= 0) { return false; } return true; }
Vulnerability Classification: - CWE: CWE-434 - CVE: CVE-2023-40183 - Severity: MEDIUM - CVSS Score: 5.3 Description: fix: 加强图片校验,防止恶意代码通过合成到图片上传到服务器中引起的攻击行为 Function: isImage File: core/backend/src/main/java/io/dataease/service/staticResource/StaticResourceService.java Repository: dataease Fixed Code: private boolean isImage(MultipartFile file) { BufferedImage image = null; try (InputStream input = file.getInputStream()) { image = ImageIO.read(input); } catch (IOException e) { LogUtil.error(e.getMessage(), e); return false; } Pattern pattern = Pattern.compile("\\.(png|jpg|jpeg|gif)$"); Matcher matcher = pattern.matcher(file.getOriginalFilename().toLowerCase()); if (image == null || image.getWidth() <= 0 || image.getHeight() <= 0 || !matcher.find()) { return false; } return true; }
[ "CWE-434" ]
CVE-2023-40183
MEDIUM
5.3
dataease
isImage
core/backend/src/main/java/io/dataease/service/staticResource/StaticResourceService.java
826513053146721a2b3e09a9c9d3ea41f8f10569
1
Analyze the following code function for security vulnerabilities
protected void readHeader() throws IOException { int readBytes = 0; while (readBytes < header.length) { int ret = in.read(header, readBytes, header.length - readBytes); if (ret == -1) { break; } readBytes += ret; } // Quick test of the header if (readBytes == 0) { // Snappy produces at least 1-byte result. So the empty input is not a valid input throw new SnappyIOException(SnappyErrorCode.EMPTY_INPUT, "Cannot decompress empty stream"); } if (readBytes < header.length || !SnappyCodec.hasMagicHeaderPrefix(header)) { // do the default uncompression // (probably) compressed by Snappy.compress(byte[]) readFully(header, readBytes); return; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: readHeader File: src/main/java/org/xerial/snappy/SnappyInputStream.java Repository: xerial/snappy-java The code follows secure coding practices.
[ "CWE-770" ]
CVE-2023-34455
HIGH
7.5
xerial/snappy-java
readHeader
src/main/java/org/xerial/snappy/SnappyInputStream.java
3bf67857fcf70d9eea56eed4af7c925671e8eaea
0
Analyze the following code function for security vulnerabilities
private void processSmallIconColor(Icon smallIcon, RemoteViews contentView, StandardTemplateParams p) { boolean colorable = !isLegacy() || getColorUtil().isGrayscaleIcon(mContext, smallIcon); int color = getSmallIconColor(p); contentView.setInt(R.id.icon, "setBackgroundColor", getBackgroundColor(p)); contentView.setInt(R.id.icon, "setOriginalIconColor", colorable ? color : COLOR_INVALID); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: processSmallIconColor File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
processSmallIconColor
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public void extractFile(FileHeader hd, OutputStream os) throws RarException { if (!headers.contains(hd)) { throw new RarException(RarExceptionType.headerNotInArchive); } try { doExtractFile(hd, os); } catch (Exception e) { if (e instanceof RarException) { throw (RarException) e; } else { throw new RarException(e); } } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: extractFile File: src/main/java/com/github/junrar/Archive.java Repository: junrar The code follows secure coding practices.
[ "CWE-835" ]
CVE-2018-12418
MEDIUM
4.3
junrar
extractFile
src/main/java/com/github/junrar/Archive.java
ad8d0ba8e155630da8a1215cee3f253e0af45817
0
Analyze the following code function for security vulnerabilities
@Override public boolean isStatusBarDisabled(String callerPackage) { final CallerIdentity caller = getCallerIdentity(callerPackage); if (isUnicornFlagEnabled()) { enforceCanQuery( MANAGE_DEVICE_POLICY_STATUS_BAR, caller.getPackageName(), caller.getUserId()); } else { Preconditions.checkCallAuthorization( isProfileOwner(caller) || isDefaultDeviceOwner(caller)); } int userId = caller.getUserId(); synchronized (getLockObject()) { if (!isUnicornFlagEnabled()) { Preconditions.checkCallAuthorization(isUserAffiliatedWithDeviceLocked(userId), "Admin " + callerPackage + " is neither the device owner or affiliated user's profile owner."); if (isManagedProfile(userId)) { throw new SecurityException("Managed profile cannot disable status bar"); } } DevicePolicyData policy = getUserData(userId); return policy.mStatusBarDisabled; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: isStatusBarDisabled File: services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-40089
HIGH
7.8
android
isStatusBarDisabled
services/devicepolicy/java/com/android/server/devicepolicy/DevicePolicyManagerService.java
e2e05f488da6abc765a62e7faf10cb74e729732e
0
Analyze the following code function for security vulnerabilities
public void doScript(StaplerRequest req, StaplerResponse rsp) throws IOException, ServletException { doScript(req, rsp, req.getView(this, "_script.jelly")); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: doScript 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
doScript
core/src/main/java/jenkins/model/Jenkins.java
a0b00508eeb74d7033dc4100eb382df4e8fa72e7
0
Analyze the following code function for security vulnerabilities
static int getExternalResult(int result) { // Aborted results are treated as successes externally, but we must track them internally. return result != START_ABORTED ? result : START_SUCCESS; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getExternalResult File: services/core/java/com/android/server/wm/ActivityStarter.java Repository: android The code follows secure coding practices.
[ "CWE-269" ]
CVE-2023-21269
HIGH
7.8
android
getExternalResult
services/core/java/com/android/server/wm/ActivityStarter.java
70ec64dc5a2a816d6aa324190a726a85fd749b30
0
Analyze the following code function for security vulnerabilities
public HttpRequest set(String destination) { destination = destination.trim(); // http method, optional int ndx = destination.indexOf(' '); if (ndx != -1) { final String method = destination.substring(0, ndx).toUpperCase(); try { final HttpMethod httpMethod = HttpMethod.valueOf(method); this.method = httpMethod.name(); destination = destination.substring(ndx + 1); } catch (final IllegalArgumentException ignore) { // unknown http method } } // protocol ndx = destination.indexOf("://"); if (ndx != -1) { protocol = destination.substring(0, ndx); destination = destination.substring(ndx + 3); } // host ndx = destination.indexOf('/'); if (ndx == -1) { ndx = destination.length(); } if (ndx != 0) { String hostToSet = destination.substring(0, ndx); destination = destination.substring(ndx); // port ndx = hostToSet.indexOf(':'); if (ndx == -1) { port = Defaults.DEFAULT_PORT; } else { port = Integer.parseInt(hostToSet.substring(ndx + 1)); hostToSet = hostToSet.substring(0, ndx); } host(hostToSet); } // path + query path(destination); return this; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: set File: src/main/java/jodd/http/HttpRequest.java Repository: oblac/jodd-http The code follows secure coding practices.
[ "CWE-74" ]
CVE-2022-29631
MEDIUM
5
oblac/jodd-http
set
src/main/java/jodd/http/HttpRequest.java
e50f573c8f6a39212ade68c6eb1256b2889fa8a6
0
Analyze the following code function for security vulnerabilities
public JSONArray names() { JSONArray ja = new JSONArray(); Iterator keys = keys(); while (keys.hasNext()) { ja.put(keys.next()); } return ja.length() == 0 ? null : ja; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: names File: src/main/java/org/codehaus/jettison/json/JSONObject.java Repository: jettison-json/jettison The code follows secure coding practices.
[ "CWE-674", "CWE-787" ]
CVE-2022-45693
HIGH
7.5
jettison-json/jettison
names
src/main/java/org/codehaus/jettison/json/JSONObject.java
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
0
Analyze the following code function for security vulnerabilities
public Descriptor getItemTypeDescriptorOrDie() { Class it = getItemType(); if (it == null) { throw new AssertionError(clazz + " is not an array/collection type in " + displayName + ". See https://wiki.jenkins-ci.org/display/JENKINS/My+class+is+missing+descriptor"); } Descriptor d = Jenkins.getInstance().getDescriptor(it); if (d==null) throw new AssertionError(it +" is missing its descriptor in "+displayName+". See https://wiki.jenkins-ci.org/display/JENKINS/My+class+is+missing+descriptor"); return d; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getItemTypeDescriptorOrDie File: core/src/main/java/hudson/model/Descriptor.java Repository: jenkinsci/jenkins The code follows secure coding practices.
[ "CWE-264" ]
CVE-2013-7330
MEDIUM
4
jenkinsci/jenkins
getItemTypeDescriptorOrDie
core/src/main/java/hudson/model/Descriptor.java
36342d71e29e0620f803a7470ce96c61761648d8
0
Analyze the following code function for security vulnerabilities
public void addTriggerGroupToNeverDelete(String group) { if(group != null) triggerGroupsToNeverDelete.add(group); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addTriggerGroupToNeverDelete File: quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java Repository: quartz-scheduler/quartz The code follows secure coding practices.
[ "CWE-611" ]
CVE-2019-13990
HIGH
7.5
quartz-scheduler/quartz
addTriggerGroupToNeverDelete
quartz-core/src/main/java/org/quartz/xml/XMLSchedulingDataProcessor.java
a1395ba118df306c7fe67c24fb0c9a95a4473140
0
Analyze the following code function for security vulnerabilities
public void deleteAllDocuments(XWikiDocument doc, boolean toTrash, XWikiContext context) throws XWikiException { // Wrap the work as a batch operation. BatchOperationExecutor batchOperationExecutor = Utils.getComponent(BatchOperationExecutor.class); batchOperationExecutor.execute(() -> { // Delete all translation documents for (Locale locale : doc.getTranslationLocales(context)) { XWikiDocument tdoc = doc.getTranslatedDocument(locale, context); deleteDocument(tdoc, toTrash, context); } // Delete the default document deleteDocument(doc, toTrash, context); }); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: deleteAllDocuments 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
deleteAllDocuments
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 void parseTermArguments(int args, List<Element> elements, XmlSerializer serializer) throws Exception { if (args == 1) { parseTerm("argTerm", elements, serializer, false); } else for (int i = 0; i < args; i++) { parseTerm("argTerm" + Integer.toString(args - i), elements, serializer, false); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: parseTermArguments File: app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java Repository: mkulesh/microMathematics The code follows secure coding practices.
[ "CWE-611" ]
CVE-2018-1000821
HIGH
7.5
mkulesh/microMathematics
parseTermArguments
app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
5c05ac8de16c569ff0a1816f20be235090d3dd9d
0
Analyze the following code function for security vulnerabilities
protected DeleteMethod executeDelete(String uri) throws Exception { DeleteMethod postMethod = new DeleteMethod(uri); this.httpClient.executeMethod(postMethod); return postMethod; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: executeDelete 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
executeDelete
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 protected boolean hasConflictingGestures() { return mStatusBar.getBarState() != StatusBarState.SHADE; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: hasConflictingGestures File: packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2017-0822
HIGH
7.5
android
hasConflictingGestures
packages/SystemUI/src/com/android/systemui/statusbar/phone/NotificationPanelView.java
c574568aaede7f652432deb7707f20ae54bbdf9a
0
Analyze the following code function for security vulnerabilities
void continueWindowLayout() { mWindowManager.mWindowPlacerLocked.continueLayout(mLayoutReasons != 0); if (DEBUG_ALL && !mWindowManager.mWindowPlacerLocked.isLayoutDeferred()) { Slog.i(TAG, "continueWindowLayout reason=" + mLayoutReasons); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: continueWindowLayout 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
continueWindowLayout
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
1120bc7e511710b1b774adf29ba47106292365e7
0
Analyze the following code function for security vulnerabilities
@Override public void init(ServletConfig pServletConfig) throws ServletException { super.init(pServletConfig); Configuration config = initConfig(pServletConfig); // Create a log handler early in the lifecycle, but not too early String logHandlerClass = config.get(ConfigKey.LOGHANDLER_CLASS); logHandler = logHandlerClass != null ? (LogHandler) ClassUtil.newInstance(logHandlerClass) : createLogHandler(pServletConfig,Boolean.valueOf(config.get(ConfigKey.DEBUG))); // Different HTTP request handlers httpGetHandler = newGetHttpRequestHandler(); httpPostHandler = newPostHttpRequestHandler(); if (restrictor == null) { restrictor = createRestrictor(config); } else { logHandler.info("Using custom access restriction provided by " + restrictor); } configMimeType = config.get(ConfigKey.MIME_TYPE); backendManager = new BackendManager(config,logHandler, restrictor); requestHandler = new HttpRequestHandler(config,backendManager,logHandler); allowDnsReverseLookup = config.getAsBoolean(ConfigKey.ALLOW_DNS_REVERSE_LOOKUP); streamingEnabled = config.getAsBoolean(ConfigKey.STREAMING); initDiscoveryMulticast(config); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: init File: agent/core/src/main/java/org/jolokia/http/AgentServlet.java Repository: jolokia The code follows secure coding practices.
[ "CWE-79" ]
CVE-2018-1000129
MEDIUM
4.3
jolokia
init
agent/core/src/main/java/org/jolokia/http/AgentServlet.java
5895d5c137c335e6b473e9dcb9baf748851bbc5f
0
Analyze the following code function for security vulnerabilities
String getExternalNames() { return externalNames; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getExternalNames File: h2/src/main/org/h2/server/web/WebServer.java Repository: h2database The code follows secure coding practices.
[ "CWE-312" ]
CVE-2022-45868
HIGH
7.8
h2database
getExternalNames
h2/src/main/org/h2/server/web/WebServer.java
23ee3d0b973923c135fa01356c8eaed40b895393
0
Analyze the following code function for security vulnerabilities
public SourceInfo createFromParcel(Parcel in) { return new SourceInfo(in.readInt(), in.readLong()); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: createFromParcel File: core/java/android/app/ActivityOptions.java Repository: android The code follows secure coding practices.
[ "CWE-Other" ]
CVE-2023-20918
CRITICAL
9.8
android
createFromParcel
core/java/android/app/ActivityOptions.java
51051de4eb40bb502db448084a83fd6cbfb7d3cf
0
Analyze the following code function for security vulnerabilities
private RemoteViews minimallyDecoratedBigContentView(@NonNull RemoteViews customContent) { StandardTemplateParams p = mParams.reset() .viewType(StandardTemplateParams.VIEW_TYPE_BIG) .decorationType(StandardTemplateParams.DECORATION_MINIMAL) .fillTextsFrom(this); TemplateBindResult result = new TemplateBindResult(); RemoteViews standard = applyStandardTemplateWithActions(getBigBaseLayoutResource(), p, result); buildCustomContentIntoTemplate(mContext, standard, customContent, p, result); makeHeaderExpanded(standard); return standard; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: minimallyDecoratedBigContentView File: core/java/android/app/Notification.java Repository: android The code follows secure coding practices.
[ "CWE-862" ]
CVE-2023-21288
MEDIUM
5.5
android
minimallyDecoratedBigContentView
core/java/android/app/Notification.java
726247f4f53e8cc0746175265652fa415a123c0c
0
Analyze the following code function for security vulnerabilities
public Class<T> getBeanType() { return beanType; }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: getBeanType 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
getBeanType
server/src/main/java/com/vaadin/ui/Grid.java
c40bed109c3723b38694ed160ea647fef5b28593
0
Analyze the following code function for security vulnerabilities
private static Node migrateDefaultMultiValueProvider(Element defaultMultiValueProviderElement) { List<NodeTuple> tuples = new ArrayList<>(); String classTag = getClassTag(defaultMultiValueProviderElement.attributeValue("class")); Element scriptNameElement = defaultMultiValueProviderElement.element("scriptName"); if (scriptNameElement != null) { tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "scriptName"), new ScalarNode(Tag.STR, scriptNameElement.getText().trim()))); } Element valueElement = defaultMultiValueProviderElement.element("value"); if (valueElement != null) { List<Node> valueItemNodes = new ArrayList<>(); for (Element valueItemElement: valueElement.elements()) valueItemNodes.add(new ScalarNode(Tag.STR, valueItemElement.getText().trim())); tuples.add(new NodeTuple( new ScalarNode(Tag.STR, "value"), new SequenceNode(Tag.SEQ, valueItemNodes, FlowStyle.BLOCK))); } return new MappingNode(new Tag(classTag), tuples, FlowStyle.BLOCK); }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: migrateDefaultMultiValueProvider File: server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java Repository: theonedev/onedev The code follows secure coding practices.
[ "CWE-538" ]
CVE-2021-21250
MEDIUM
4
theonedev/onedev
migrateDefaultMultiValueProvider
server-core/src/main/java/io/onedev/server/migration/XmlBuildSpecMigrator.java
9196fd795e87dab069b4260a3590a0ea886e770f
0
Analyze the following code function for security vulnerabilities
public static String generateQuickCode(Record record) { Entity entity = record.getEntity(); if (!entity.containsField(EntityHelper.QuickCode)) return null; Field nameField = entity.getNameField(); if (!record.hasValue(nameField.getName(), false)) return null; Object nameValue = record.getObjectValue(nameField.getName()); DisplayType dt = EasyMetaFactory.getDisplayType(nameField); if (dt == DisplayType.TEXT || dt == DisplayType.SERIES || dt == DisplayType.EMAIL || dt == DisplayType.PHONE || dt == DisplayType.URL || dt == DisplayType.NUMBER || dt == DisplayType.DECIMAL) { nameValue = nameValue.toString(); } else if (dt == DisplayType.PICKLIST) { nameValue = PickListManager.instance.getLabel((ID) nameValue); } else if (dt == DisplayType.STATE) { StateSpec state = StateManager.instance.findState(nameField, nameValue); nameValue = Language.L(state); } else if (dt == DisplayType.CLASSIFICATION) { nameValue = ClassificationManager.instance.getFullName((ID) nameValue); } else if (dt == DisplayType.DATE || dt == DisplayType.DATETIME) { nameValue = CalendarUtils.getPlainDateFormat().format(nameValue); } else if (dt == DisplayType.LOCATION) { nameValue = nameValue.toString().split(CommonsUtils.COMM_SPLITER_RE)[0]; } else { nameValue = null; } if (nameValue == null) return null; return generateQuickCode((String) nameValue); }
Vulnerability Classification: - CWE: CWE-89 - CVE: CVE-2023-1495 - Severity: MEDIUM - CVSS Score: 6.5 Description: H5 sync2 (#595) * style: 目录样式gh * style: J_new * feat: advListFilterTabs * feat: nav-copyto * enh: 助记码全拼 * enh: 地图搜索选点 * enh: topnav * list pn * .form-line.v33 * open TAG * KVS addShutdownHook * fix: #594 --------- Co-authored-by: devezhao <zhaofang123@gmail.com> Function: generateQuickCode File: src/main/java/com/rebuild/core/service/general/QuickCodeReindexTask.java Repository: getrebuild/rebuild Fixed Code: public static String generateQuickCode(Record record) { Entity entity = record.getEntity(); if (!entity.containsField(EntityHelper.QuickCode)) return null; Field nameField = entity.getNameField(); if (!record.hasValue(nameField.getName(), Boolean.FALSE)) return null; Object nameValue = record.getObjectValue(nameField.getName()); DisplayType dt = EasyMetaFactory.getDisplayType(nameField); if (dt == DisplayType.TEXT || dt == DisplayType.SERIES || dt == DisplayType.EMAIL || dt == DisplayType.PHONE || dt == DisplayType.URL || dt == DisplayType.NUMBER || dt == DisplayType.DECIMAL) { nameValue = nameValue.toString(); } else if (dt == DisplayType.PICKLIST) { nameValue = PickListManager.instance.getLabel((ID) nameValue); } else if (dt == DisplayType.STATE) { StateSpec state = StateManager.instance.findState(nameField, nameValue); nameValue = Language.L(state); } else if (dt == DisplayType.CLASSIFICATION) { nameValue = ClassificationManager.instance.getFullName((ID) nameValue); } else if (dt == DisplayType.DATE || dt == DisplayType.DATETIME) { nameValue = CalendarUtils.getPlainDateFormat().format(nameValue); } else if (dt == DisplayType.LOCATION) { nameValue = nameValue.toString().split(CommonsUtils.COMM_SPLITER_RE)[0]; } else { nameValue = null; } if (nameValue == null) return null; return generateQuickCode((String) nameValue); }
[ "CWE-89" ]
CVE-2023-1495
MEDIUM
6.5
getrebuild/rebuild
generateQuickCode
src/main/java/com/rebuild/core/service/general/QuickCodeReindexTask.java
c9474f84e5f376dd2ade2078e3039961a9425da7
1
Analyze the following code function for security vulnerabilities
public final void addProvider(PackageParser.Provider p) { if (mProviders.containsKey(p.getComponentName())) { Slog.w(TAG, "Provider " + p.getComponentName() + " already defined; ignoring"); return; } mProviders.put(p.getComponentName(), p); if (DEBUG_SHOW_INFO) { Log.v(TAG, " " + (p.info.nonLocalizedLabel != null ? p.info.nonLocalizedLabel : p.info.name) + ":"); Log.v(TAG, " Class=" + p.info.name); } final int NI = p.intents.size(); int j; for (j = 0; j < NI; j++) { PackageParser.ProviderIntentInfo intent = p.intents.get(j); if (DEBUG_SHOW_INFO) { Log.v(TAG, " IntentFilter:"); intent.dump(new LogPrinter(Log.VERBOSE, TAG), " "); } if (!intent.debugCheck()) { Log.w(TAG, "==> For Provider " + p.info.name); } addFilter(intent); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addProvider 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
addProvider
services/core/java/com/android/server/pm/PackageManagerService.java
a75537b496e9df71c74c1d045ba5569631a16298
0
Analyze the following code function for security vulnerabilities
public Object run() { try { return innerLogin(); } catch (LoginException e) { return e; } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: run File: jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java Repository: wildfly-security/jboss-negotiation The code follows secure coding practices.
[ "CWE-200" ]
CVE-2015-1849
MEDIUM
4.3
wildfly-security/jboss-negotiation
run
jboss-negotiation-extras/src/main/java/org/jboss/security/negotiation/AdvancedLdapLoginModule.java
0dc9d191b6eb1d13b8f0189c5b02ba6576f4722e
0
Analyze the following code function for security vulnerabilities
private MediaPackage addSmilCatalog(org.w3c.dom.Document smilDocument, MediaPackage mediaPackage) throws IOException, IngestException { Option<org.w3c.dom.Document> optSmilDocument = loadSmilDocument(workingFileRepository, mediaPackage); if (optSmilDocument.isSome()) throw new IngestException("SMIL already exists!"); InputStream in = null; try { in = XmlUtil.serializeDocument(smilDocument); String elementId = UUID.randomUUID().toString(); URI uri = workingFileRepository.put(mediaPackage.getIdentifier().toString(), elementId, PARTIAL_SMIL_NAME, in); MediaPackageElement mpe = mediaPackage.add(uri, MediaPackageElement.Type.Catalog, MediaPackageElements.SMIL); mpe.setIdentifier(elementId); // Reset the checksum since it changed mpe.setChecksum(null); mpe.setMimeType(MimeTypes.SMIL); return mediaPackage; } finally { IoSupport.closeQuietly(in); } }
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: addSmilCatalog File: modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java Repository: opencast The code follows secure coding practices.
[ "CWE-287" ]
CVE-2022-29237
MEDIUM
5.5
opencast
addSmilCatalog
modules/ingest-service-impl/src/main/java/org/opencastproject/ingest/impl/IngestServiceImpl.java
8d5ec1614eed109b812bc27b0c6d3214e456d4e7
0
Analyze the following code function for security vulnerabilities
protected abstract void checkKeys() throws IOException;
No Vulnerability Detected: This code is secure and does not contain known vulnerabilities. Function: checkKeys File: sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java Repository: apache/mina-sshd The code follows secure coding practices.
[ "CWE-354" ]
CVE-2023-48795
MEDIUM
5.9
apache/mina-sshd
checkKeys
sshd-core/src/main/java/org/apache/sshd/common/session/helpers/AbstractSession.java
6b0fd46f64bcb75eeeee31d65f10242660aad7c1
0