instruction
string | input
string | output
string | cwe_ids
list | cve_id
string | severity
string | cvss_score
float64 | repo_name
string | func_name
string | file_path
string | commit_hash
string | is_vulnerable
int64 |
|---|---|---|---|---|---|---|---|---|---|---|---|
Analyze the following code function for security vulnerabilities
|
public void updateImportData(List<IssuesUpdateRequest> issues) {
issues.parallelStream().forEach(issue -> {
updateIssues(issue);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateImportData
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
updateImportData
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
void startBluetoothDisable() {
mAdapterStateMachine.sendMessage(mAdapterStateMachine.obtainMessage(AdapterState.BEGIN_DISABLE));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: startBluetoothDisable
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
startBluetoothDisable
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
private void verifyStatesInner() {
synchronized (mLock) {
forEachLoadedUserLocked(u -> u.forAllPackageItems(ShortcutPackageItem::verifyStates));
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: verifyStatesInner
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
|
verifyStatesInner
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
protected Set<Entry<String, Object>> entrySet() {
return this.map.entrySet();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: entrySet
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
entrySet
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected Class<?> loadClass(String name, boolean resolve) throws ClassNotFoundException {
Class<?> loadedClass = findLoadedClass(name);
if (null == loadedClass) {
try {
loadedClass = findClass(name);
} catch (ClassNotFoundException ex) {
loadedClass = super.loadClass(name, resolve);
}
}
if (resolve) {
resolveClass(loadedClass);
}
return loadedClass;
}
|
Vulnerability Classification:
- CWE: CWE-611
- CVE: CVE-2022-41967
- Severity: HIGH
- CVSS Score: 7.5
Description: fix: CVE-2022-41967
Dragonfly v0.3.0-SNAPSHOT fails to properly configure the
DocumentBuilderFactory to prevent XML enternal entity (XXE) attacks when
parsing maven-metadata.xml files provided by external Maven repositories
during "SNAPSHOT" version resolution.
This patches CVE-2022-41967 by disabling features which may lead to XXE.
If you are currently using v0.3.0-SNAPSHOT it is STRONGLY advised to
update Dragonfly to v0.3.1-SNAPSHOT just to be safe.
Function: loadClass
File: src/main/java/dev/hypera/dragonfly/loading/DragonflyClassLoader.java
Repository: HyperaDev/Dragonfly
Fixed Code:
@Override
protected @NotNull Class<?> loadClass(@NotNull String name, boolean resolve) throws ClassNotFoundException {
Class<?> loadedClass = findLoadedClass(name);
if (null == loadedClass) {
try {
loadedClass = findClass(name);
} catch (ClassNotFoundException ex) {
loadedClass = super.loadClass(name, resolve);
}
}
if (resolve) {
resolveClass(loadedClass);
}
return loadedClass;
}
|
[
"CWE-611"
] |
CVE-2022-41967
|
HIGH
| 7.5
|
HyperaDev/Dragonfly
|
loadClass
|
src/main/java/dev/hypera/dragonfly/loading/DragonflyClassLoader.java
|
9661375e1135127ca6cdb5712e978bec33cc06b3
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void cacheShortcuts(int launcherUserId,
@NonNull String callingPackage, @NonNull String packageName,
@NonNull List<String> shortcutIds, int userId, int cacheFlags) {
updateCachedShortcutsInternal(launcherUserId, callingPackage, packageName, shortcutIds,
userId, cacheFlags, /* doCache= */ true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cacheShortcuts
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
|
cacheShortcuts
|
services/core/java/com/android/server/pm/ShortcutService.java
|
96e0524c48c6e58af7d15a2caf35082186fc8de2
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onAppFreezeTimeout() {
Slog.w(TAG_WM, "Force clearing freeze: " + this);
stopFreezingScreen(true, true);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAppFreezeTimeout
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
onAppFreezeTimeout
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public void parseStyleElement(ApplContext ac, Reader reader,
String title, String media,
URL url, int lineno) {
boolean doneref = false;
style.setWarningLevel(ac.getWarningLevel());
if (Util.onDebug) {
System.err.println("StyleSheet.parseStyleElement(" + title + ", "
+ media + ", " + url
+ "," + lineno + ")");
}
URL ref = ac.getReferrer();
try {
// if (cssFouffa == null) {
String charset = ac.getCharsetForURL(url);
cssFouffa = new CssFouffa(ac, reader, url, lineno);
cssFouffa.addListener(this);
// } else {
// cssFouffa.ReInit(ac, input, url, lineno);
// }
// cssFouffa.setResponse(res);
// cssFouffa.setDefaultMedium(defaultmedium);
// cssFouffa.doConfig();
if (media == null && ac.getCssVersion() != CssVersion.CSS1) {
media = "all";
}
AtRuleMedia m = AtRuleMedia.getInstance(ac.getCssVersion());
try {
if (media != null) {
addMedias(m, media, ac);
}
cssFouffa.setAtRule(m);
} catch (org.w3c.css.util.InvalidParamException e) {
Errors er = new Errors();
er.addError(new org.w3c.css.parser.CssError(url.toString(),
-1, e));
notifyErrors(er);
return;
}
ac.setReferrer(url);
doneref = true;
cssFouffa.parseStyle();
} catch (IOException e) {
Errors er = new Errors();
er.addError(new org.w3c.css.parser.CssError(url.toString(),
-1, e));
notifyErrors(er);
} catch (TokenMgrError e) {
Errors er = new Errors();
CssParseException cpe = null;
if (co != null) {
try {
Object o[] = new Object[1];
o[0] = e;
Exception new_e = (Exception) co.newInstance(o);
cpe = new CssParseException(new_e);
} catch (Exception ex) {
cpe = null;
}
}
if (cpe == null) {
cpe = new CssParseException(new Exception(e.getMessage()));
}
er.addError(new org.w3c.css.parser.CssError(url.toString(),
-1,
//e.getErrorLine(),
cpe));
notifyErrors(er);
} catch (RuntimeException e) {
Errors er = new Errors();
er.addError(new org.w3c.css.parser.CssError(url.toString(),
cssFouffa.getLine(),
new CssParseException(e)));
notifyErrors(er);
} finally {
if (doneref) {
ac.setReferrer(ref);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseStyleElement
File: org/w3c/css/css/StyleSheetParser.java
Repository: w3c/css-validator
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-4070
|
LOW
| 3.5
|
w3c/css-validator
|
parseStyleElement
|
org/w3c/css/css/StyleSheetParser.java
|
e5c09a9119167d3064db786d5f00d730b584a53b
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onReceive(Context context, Intent intent) {
if (!mPhone.mIsTheCurrentActivePhone) {
Rlog.e(LOG_TAG, "Received Intent " + intent +
" while being destroyed. Ignoring.");
return;
}
if (intent.getAction().equals(Intent.ACTION_LOCALE_CHANGED)) {
// update emergency string whenever locale changed
updateSpnDisplay();
} else if (intent.getAction().equals(ACTION_RADIO_OFF)) {
mAlarmSwitch = false;
DcTrackerBase dcTracker = mPhone.mDcTracker;
powerOffRadioSafely(dcTracker);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onReceive
File: src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2016-3831
|
MEDIUM
| 5
|
android
|
onReceive
|
src/java/com/android/internal/telephony/gsm/GsmServiceStateTracker.java
|
f47bc301ccbc5e6d8110afab5a1e9bac1d4ef058
| 0
|
Analyze the following code function for security vulnerabilities
|
public void initListenUtil() {
listenUtilButton.addActionListener(e -> {
String t;
if (LANG == CHINESE) {
t = "监听端口工具";
} else {
t = "Listener";
}
JFrame frame = new JFrame(t);
frame.setContentPane(new ListenUtilForm().listenUtilPanel);
frame.setResizable(false);
frame.pack();
frame.setVisible(true);
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initListenUtil
File: src/main/java/com/chaitin/xray/form/MainForm.java
Repository: 4ra1n/super-xray
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-41958
|
HIGH
| 7.8
|
4ra1n/super-xray
|
initListenUtil
|
src/main/java/com/chaitin/xray/form/MainForm.java
|
4d0d59663596db03f39d7edd2be251d48b52dcfc
| 0
|
Analyze the following code function for security vulnerabilities
|
public String generateNewEmailValidationTok() {
emailValidationTok = new Token(TokenType.EMAIL_VERIF, 1);
emailValidated = false;
save();
return emailValidationTok.token;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: generateNewEmailValidationTok
File: src/gribbit/auth/User.java
Repository: lukehutch/gribbit
The code follows secure coding practices.
|
[
"CWE-346"
] |
CVE-2014-125071
|
MEDIUM
| 5.2
|
lukehutch/gribbit
|
generateNewEmailValidationTok
|
src/gribbit/auth/User.java
|
620418df247aebda3dd4be1dda10fe229ea505dd
| 0
|
Analyze the following code function for security vulnerabilities
|
@SuppressWarnings("unchecked")
protected final B self() {
return (B) this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: self
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
|
self
|
codec-http2/src/main/java/io/netty/handler/codec/http2/AbstractHttp2ConnectionHandlerBuilder.java
|
58f75f665aa81a8cbcf6ffa74820042a285c5e61
| 0
|
Analyze the following code function for security vulnerabilities
|
public static @NonNull ActivityOptions makeCustomAnimation(@NonNull Context context,
int enterResId, int exitResId, int backgroundColor) {
return makeCustomAnimation(context, enterResId, exitResId, backgroundColor, null, null);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: makeCustomAnimation
File: core/java/android/app/ActivityOptions.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-20918
|
CRITICAL
| 9.8
|
android
|
makeCustomAnimation
|
core/java/android/app/ActivityOptions.java
|
51051de4eb40bb502db448084a83fd6cbfb7d3cf
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getRenderedContent(String text, String syntaxId, XWikiContext context)
{
return getRenderedContent(text, syntaxId, getOutputSyntax().toIdString(), context);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRenderedContent
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
|
getRenderedContent
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ServerBuilder decorator(
Route route, Function<? super HttpService, ? extends HttpService> decorator) {
virtualHostTemplate.decorator(route, decorator);
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: decorator
File: core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
Repository: line/armeria
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-44487
|
HIGH
| 7.5
|
line/armeria
|
decorator
|
core/src/main/java/com/linecorp/armeria/server/ServerBuilder.java
|
df7f85824a62e997b910b5d6194a3335841065fd
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
}
|
Vulnerability Classification:
- CWE: CWE-89
- CVE: CVE-2014-125075
- Severity: MEDIUM
- CVSS Score: 5.2
Description: Added validation for contact adding and changed use of prepared statements to avoid SQL injection.
Function: doGet
File: src/Error.java
Repository: ChrisMcMStone/gmail-servlet
Fixed Code:
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
doPost(request, response);
}
|
[
"CWE-89"
] |
CVE-2014-125075
|
MEDIUM
| 5.2
|
ChrisMcMStone/gmail-servlet
|
doGet
|
src/Error.java
|
5d72753c2e95bb373aa86824939397dc25f679ea
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onAccessibilityStateChanged(boolean enabled) {
setAccessibilityState(enabled);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onAccessibilityStateChanged
File: content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
Repository: chromium
The code follows secure coding practices.
|
[
"CWE-20"
] |
CVE-2014-3159
|
MEDIUM
| 6.4
|
chromium
|
onAccessibilityStateChanged
|
content/public/android/java/src/org/chromium/content/browser/ContentViewCore.java
|
98a50b76141f0b14f292f49ce376e6554142d5e2
| 0
|
Analyze the following code function for security vulnerabilities
|
void enforcePermissionCapLocked(PermissionInfo info, BasePermission tree) {
// We calculate the max size of permissions defined by this uid and throw
// if that plus the size of 'info' would exceed our stated maximum.
if (tree.uid != Process.SYSTEM_UID) {
final int curTreeSize = calculateCurrentPermissionFootprintLocked(tree);
if (curTreeSize + permissionInfoFootprint(info) > MAX_PERMISSION_TREE_FOOTPRINT) {
throw new SecurityException("Permission tree size cap exceeded");
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforcePermissionCapLocked
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
|
enforcePermissionCapLocked
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public int hashCode() {
return myHashMap.hashCode();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: hashCode
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
|
hashCode
|
src/main/java/org/codehaus/jettison/json/JSONObject.java
|
cf6a4a1f85416b49b16a5b0c5c0bb81a4833dbc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getCheckUrl(String fieldName) {
String method = checkMethods.get(fieldName);
if(method==null) {
method = calcCheckUrl(fieldName);
checkMethods.put(fieldName,method);
}
if (method.equals(NONE)) // == would do, but it makes IDE flag a warning
return null;
// put this under the right contextual umbrella.
// a is always non-null because we already have Hudson as the sentinel
return '\'' + jsStringEscape(getCurrentDescriptorByNameUrl()) + "/'+" + method;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCheckUrl
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
|
getCheckUrl
|
core/src/main/java/hudson/model/Descriptor.java
|
36342d71e29e0620f803a7470ce96c61761648d8
| 0
|
Analyze the following code function for security vulnerabilities
|
private boolean isSettingRestrictedForUser(String name, int userId,
String value, int callerUid) {
final long oldId = Binder.clearCallingIdentity();
try {
return (name != null
&& mUserManager.isSettingRestrictedForUser(name, userId, value, callerUid));
} finally {
Binder.restoreCallingIdentity(oldId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isSettingRestrictedForUser
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
isSettingRestrictedForUser
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
ff86ff28cf82124f8e65833a2dd8c319aea08945
| 0
|
Analyze the following code function for security vulnerabilities
|
@Produces(MediaType.APPLICATION_JSON)
@RequestMapping(value = "/api/v1/forms/migrate/preview", method = RequestMethod.POST)
public @ResponseBody ReportLog runPreview(HttpServletRequest request, HttpServletResponse response) throws Exception {
TransferObject transferObject = getUIComponents(request);
ResponseEntity<HelperObject> res = runPreviewTest(transferObject, request);
HelperObject helperObject = res.getBody();
helperObject.getReportLog().setReportPreview(toStringHtmlFormat(helperObject.getReportLog(), resterms));
return helperObject.getReportLog();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: runPreview
File: web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
Repository: OpenClinica
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-24830
|
HIGH
| 7.5
|
OpenClinica
|
runPreview
|
web/src/main/java/org/akaza/openclinica/controller/BatchCRFMigrationController.java
|
6f864e86543f903bd20d6f9fc7056115106441f3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Test
public void selectStream(TestContext context) {
createNumbers(context, 15, 16, 17)
.selectStream("SELECT i FROM numbers WHERE i IN (15, 17, 19) ORDER BY i", context.asyncAssertSuccess(select -> {
intsAsString(select, context.asyncAssertSuccess(string -> {
context.assertEquals("15, 17", string);
}));
}));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: selectStream
File: domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
Repository: folio-org/raml-module-builder
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2019-15534
|
HIGH
| 7.5
|
folio-org/raml-module-builder
|
selectStream
|
domain-models-runtime/src/test/java/org/folio/rest/persist/PostgresClientIT.java
|
b7ef741133e57add40aa4cb19430a0065f378a94
| 0
|
Analyze the following code function for security vulnerabilities
|
private Class<? extends JiffleRuntime> getRuntimeBaseClass(RuntimeModel model) {
Class<? extends JiffleRuntime> baseClass = null;
switch (model) {
case DIRECT:
baseClass = it.geosolutions.jaiext.jiffle.JiffleProperties.DEFAULT_DIRECT_BASE_CLASS;
break;
case INDIRECT:
baseClass = it.geosolutions.jaiext.jiffle.JiffleProperties.DEFAULT_INDIRECT_BASE_CLASS;
break;
}
return baseClass;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRuntimeBaseClass
File: jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
Repository: geosolutions-it/jai-ext
The code follows secure coding practices.
|
[
"CWE-94"
] |
CVE-2022-24816
|
HIGH
| 7.5
|
geosolutions-it/jai-ext
|
getRuntimeBaseClass
|
jt-jiffle/jt-jiffle-language/src/main/java/it/geosolutions/jaiext/jiffle/Jiffle.java
|
cb1d6565d38954676b0a366da4f965fef38da1cb
| 0
|
Analyze the following code function for security vulnerabilities
|
public PicketLinkType getConfiguration() {
return this.picketLinkConfiguration;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getConfiguration
File: picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
Repository: picketlink/picketlink-bindings
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2015-3158
|
MEDIUM
| 4
|
picketlink/picketlink-bindings
|
getConfiguration
|
picketlink-tomcat-common/src/main/java/org/picketlink/identity/federation/bindings/tomcat/idp/AbstractIDPValve.java
|
341a37aefd69e67b6b5f6d775499730d6ccaff0d
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isCurrentLocalUserPage(XWikiContext context)
{
final DocumentReference userRef = context.getUserReference();
return userRef != null && userRef.equals(this.getDocumentReference());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isCurrentLocalUserPage
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
|
isCurrentLocalUserPage
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setupClientDefaults(ClientRepresentation clientRep, ClientModel newClient) {
SamlRepresentationAttributes rep = new SamlRepresentationAttributes(clientRep.getAttributes());
SamlClient client = new SamlClient(newClient);
if (clientRep.isStandardFlowEnabled() == null) newClient.setStandardFlowEnabled(true);
if (rep.getCanonicalizationMethod() == null) {
client.setCanonicalizationMethod(CanonicalizationMethod.EXCLUSIVE);
}
if (rep.getSignatureAlgorithm() == null) {
client.setSignatureAlgorithm(SignatureAlgorithm.RSA_SHA256);
}
if (rep.getNameIDFormat() == null) {
client.setNameIDFormat("username");
}
if (rep.getIncludeAuthnStatement() == null) {
client.setIncludeAuthnStatement(true);
}
if (rep.getForceNameIDFormat() == null) {
client.setForceNameIDFormat(false);
}
if (rep.getSamlServerSignature() == null) {
client.setRequiresRealmSignature(true);
}
if (rep.getForcePostBinding() == null) {
client.setForcePostBinding(true);
}
if (rep.getClientSignature() == null) {
client.setRequiresClientSignature(true);
}
if (client.requiresClientSignature() && client.getClientSigningCertificate() == null) {
CertificateRepresentation info = KeycloakModelUtils.generateKeyPairCertificate(newClient.getClientId());
client.setClientSigningCertificate(info.getCertificate());
client.setClientSigningPrivateKey(info.getPrivateKey());
}
if (clientRep.isFrontchannelLogout() == null) {
newClient.setFrontchannelLogout(true);
}
client.setArtifactBindingIdentifierFrom(clientRep.getClientId());
}
|
Vulnerability Classification:
- CWE: CWE-287
- CVE: CVE-2021-3827
- Severity: MEDIUM
- CVSS Score: 6.8
Description: KEYCLOAK-19177 Disable ECP flow by default for all Saml clients; ecp flow creates only transient users sessions
Function: setupClientDefaults
File: services/src/main/java/org/keycloak/protocol/saml/SamlProtocolFactory.java
Repository: keycloak
Fixed Code:
@Override
public void setupClientDefaults(ClientRepresentation clientRep, ClientModel newClient) {
SamlRepresentationAttributes rep = new SamlRepresentationAttributes(clientRep.getAttributes());
SamlClient client = new SamlClient(newClient);
if (clientRep.isStandardFlowEnabled() == null) newClient.setStandardFlowEnabled(true);
if (rep.getCanonicalizationMethod() == null) {
client.setCanonicalizationMethod(CanonicalizationMethod.EXCLUSIVE);
}
if (rep.getSignatureAlgorithm() == null) {
client.setSignatureAlgorithm(SignatureAlgorithm.RSA_SHA256);
}
if (rep.getNameIDFormat() == null) {
client.setNameIDFormat("username");
}
if (rep.getIncludeAuthnStatement() == null) {
client.setIncludeAuthnStatement(true);
}
if (rep.getForceNameIDFormat() == null) {
client.setForceNameIDFormat(false);
}
if (rep.getAllowEcpFlow() == null) {
client.setAllowECPFlow(false);
}
if (rep.getSamlServerSignature() == null) {
client.setRequiresRealmSignature(true);
}
if (rep.getForcePostBinding() == null) {
client.setForcePostBinding(true);
}
if (rep.getClientSignature() == null) {
client.setRequiresClientSignature(true);
}
if (client.requiresClientSignature() && client.getClientSigningCertificate() == null) {
CertificateRepresentation info = KeycloakModelUtils.generateKeyPairCertificate(newClient.getClientId());
client.setClientSigningCertificate(info.getCertificate());
client.setClientSigningPrivateKey(info.getPrivateKey());
}
if (clientRep.isFrontchannelLogout() == null) {
newClient.setFrontchannelLogout(true);
}
client.setArtifactBindingIdentifierFrom(clientRep.getClientId());
}
|
[
"CWE-287"
] |
CVE-2021-3827
|
MEDIUM
| 6.8
|
keycloak
|
setupClientDefaults
|
services/src/main/java/org/keycloak/protocol/saml/SamlProtocolFactory.java
|
44000caaf5051d7f218d1ad79573bd3d175cad0d
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public void removeUser(int userId) {
synchronized (mGlobalLock) {
mRootWindowContainer.removeUser(userId);
mPackageConfigPersister.removeUser(userId);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removeUser
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
|
removeUser
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
protected final String getProxyCallbackUrl() {
return this.proxyCallbackUrl;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProxyCallbackUrl
File: cas-client-core/src/main/java/org/jasig/cas/client/validation/Cas20ServiceTicketValidator.java
Repository: apereo/java-cas-client
The code follows secure coding practices.
|
[
"CWE-74"
] |
CVE-2014-4172
|
HIGH
| 7.5
|
apereo/java-cas-client
|
getProxyCallbackUrl
|
cas-client-core/src/main/java/org/jasig/cas/client/validation/Cas20ServiceTicketValidator.java
|
ae37092100c8eaec610dab6d83e5e05a8ee58814
| 0
|
Analyze the following code function for security vulnerabilities
|
X509Certificate getUserCertificate() {
return mUserCert;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getUserCertificate
File: src/com/android/certinstaller/CredentialHelper.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-2422
|
HIGH
| 9.3
|
android
|
getUserCertificate
|
src/com/android/certinstaller/CredentialHelper.java
|
70dde9870e9450e10418a32206ac1bb30f036b2c
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean isDockedResizing() {
return (mDragResizing && getResizeMode() == DRAG_RESIZE_MODE_DOCKED_DIVIDER)
|| (isChildWindow() && getParentWindow().isDockedResizing());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isDockedResizing
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
|
isDockedResizing
|
services/core/java/com/android/server/wm/WindowState.java
|
7428962d3b064ce1122809d87af65099d1129c9e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected List<String> getTablesToDropConstraints() {
return null;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getTablesToDropConstraints
File: dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05165CreateContentTypeWorkflowActionMappingTable.java
Repository: dotCMS/core
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2020-17542
|
LOW
| 3.5
|
dotCMS/core
|
getTablesToDropConstraints
|
dotCMS/src/main/java/com/dotmarketing/startup/runonce/Task05165CreateContentTypeWorkflowActionMappingTable.java
|
782c342b660d359a71e190c8b5110bc651736591
| 0
|
Analyze the following code function for security vulnerabilities
|
void removePackageLI(PackageSetting ps, boolean chatty) {
if (DEBUG_INSTALL) {
if (chatty)
Log.d(TAG, "Removing package " + ps.name);
}
// writer
synchronized (mPackages) {
mPackages.remove(ps.name);
final PackageParser.Package pkg = ps.pkg;
if (pkg != null) {
cleanPackageDataStructuresLILPw(pkg, chatty);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: removePackageLI
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
|
removePackageLI
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public String getApplicationProtocol() {
synchronized (OpenSslEngine.this) {
return applicationProtocol;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getApplicationProtocol
File: handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
Repository: netty
The code follows secure coding practices.
|
[
"CWE-835"
] |
CVE-2016-4970
|
HIGH
| 7.8
|
netty
|
getApplicationProtocol
|
handler/src/main/java/io/netty/handler/ssl/OpenSslEngine.java
|
bc8291c80912a39fbd2303e18476d15751af0bf1
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void populateMap(HierarchicalStreamReader reader, UnmarshallingContext context,
Map map, Map target) {
SingleValueConverter keyConverter = null;
SingleValueConverter valueConverter = null;
if (keyAsAttribute) {
keyConverter = getSingleValueConverter(keyType, "key");
}
if (valueAsAttribute || valueName == null) {
valueConverter = getSingleValueConverter(valueType, "value");
}
while (reader.hasMoreChildren()) {
Object key = null;
Object value = null;
if (entryName != null) {
reader.moveDown();
if (keyConverter != null) {
String attribute = reader.getAttribute(keyName);
if (attribute != null) {
key = keyConverter.fromString(attribute);
}
}
if (valueAsAttribute && valueConverter != null) {
String attribute = reader.getAttribute(valueName);
if (attribute != null) {
value = valueConverter.fromString(attribute);
}
}
}
if (keyConverter == null) {
reader.moveDown();
if (valueConverter == null
&& !keyName.equals(valueName)
&& reader.getNodeName().equals(valueName)) {
value = readItem(valueType, reader, context, map);
} else {
key = readItem(keyType, reader, context, map);
}
reader.moveUp();
}
if (valueConverter == null) {
reader.moveDown();
if (keyConverter == null && key == null && value != null) {
key = readItem(keyType, reader, context, map);
} else {
value = readItem(valueType, reader, context, map);
}
reader.moveUp();
} else if (!valueAsAttribute) {
value = valueConverter.fromString(reader.getValue());
}
target.put(key, value);
if (entryName != null) {
reader.moveUp();
}
}
}
|
Vulnerability Classification:
- CWE: CWE-400
- CVE: CVE-2021-43859
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Describe and fix CVE-2021-43859.
Function: populateMap
File: xstream/src/java/com/thoughtworks/xstream/converters/extended/NamedMapConverter.java
Repository: x-stream/xstream
Fixed Code:
protected void populateMap(HierarchicalStreamReader reader, UnmarshallingContext context,
Map map, Map target) {
SingleValueConverter keyConverter = null;
SingleValueConverter valueConverter = null;
if (keyAsAttribute) {
keyConverter = getSingleValueConverter(keyType, "key");
}
if (valueAsAttribute || valueName == null) {
valueConverter = getSingleValueConverter(valueType, "value");
}
while (reader.hasMoreChildren()) {
Object key = null;
Object value = null;
if (entryName != null) {
reader.moveDown();
if (keyConverter != null) {
String attribute = reader.getAttribute(keyName);
if (attribute != null) {
key = keyConverter.fromString(attribute);
}
}
if (valueAsAttribute && valueConverter != null) {
String attribute = reader.getAttribute(valueName);
if (attribute != null) {
value = valueConverter.fromString(attribute);
}
}
}
if (keyConverter == null) {
reader.moveDown();
if (valueConverter == null
&& !keyName.equals(valueName)
&& reader.getNodeName().equals(valueName)) {
value = readItem(valueType, reader, context, map);
} else {
key = readItem(keyType, reader, context, map);
}
reader.moveUp();
}
if (valueConverter == null) {
reader.moveDown();
if (keyConverter == null && key == null && value != null) {
key = readItem(keyType, reader, context, map);
} else {
value = readItem(valueType, reader, context, map);
}
reader.moveUp();
} else if (!valueAsAttribute) {
value = valueConverter.fromString(reader.getValue());
}
long now = System.currentTimeMillis();
target.put(key, value);
SecurityUtils.checkForCollectionDoSAttack(context, now);
if (entryName != null) {
reader.moveUp();
}
}
}
|
[
"CWE-400"
] |
CVE-2021-43859
|
MEDIUM
| 5
|
x-stream/xstream
|
populateMap
|
xstream/src/java/com/thoughtworks/xstream/converters/extended/NamedMapConverter.java
|
e8e88621ba1c85ac3b8620337dd672e0c0c3a846
| 1
|
Analyze the following code function for security vulnerabilities
|
SipProfile getProfile() {
return mProfile;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getProfile
File: sip/src/com/android/services/telephony/sip/SipAccountRegistry.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-0847
|
HIGH
| 7.2
|
android
|
getProfile
|
sip/src/com/android/services/telephony/sip/SipAccountRegistry.java
|
a294ae5342410431a568126183efe86261668b5d
| 0
|
Analyze the following code function for security vulnerabilities
|
private ByteBuffer loadFileFromZip(
final File zip,
final File file
) {
if (zip.exists()) {
try {
return ZipFileSystemUtil
.loadBinaryFileFromZip(zip, file)
.getValue();
}
catch(Exception ex) {
return null;
}
}
else {
return null;
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: loadFileFromZip
File: src/main/java/com/github/jlangch/venice/impl/util/io/LoadPaths.java
Repository: jlangch/venice
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2022-36007
|
LOW
| 3.3
|
jlangch/venice
|
loadFileFromZip
|
src/main/java/com/github/jlangch/venice/impl/util/io/LoadPaths.java
|
c942c73136333bc493050910f171a48e6f575b23
| 0
|
Analyze the following code function for security vulnerabilities
|
int indexOfKey(int key) {
return mPidMap.indexOfKey(key);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: indexOfKey
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
indexOfKey
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public String show(Request req, Response res) throws IOException {
BackupConfig backupConfig = doFetchEntityFromConfig();
if (backupConfig == null) {
backupConfig = new BackupConfig();
}
return writerForTopLevelObject(req, res, jsonWriter(backupConfig));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: show
File: api/api-backup-config-v1/src/main/java/com/thoughtworks/go/apiv1/backupconfig/BackupConfigControllerV1.java
Repository: gocd
The code follows secure coding practices.
|
[
"CWE-352"
] |
CVE-2021-25924
|
HIGH
| 9.3
|
gocd
|
show
|
api/api-backup-config-v1/src/main/java/com/thoughtworks/go/apiv1/backupconfig/BackupConfigControllerV1.java
|
7d0baab0d361c377af84994f95ba76c280048548
| 0
|
Analyze the following code function for security vulnerabilities
|
@TestApi
public void setResourceResolutionLoggingEnabled(boolean enabled) {
synchronized (this) {
ensureValidLocked();
nativeSetResourceResolutionLoggingEnabled(mObject, enabled);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setResourceResolutionLoggingEnabled
File: core/java/android/content/res/AssetManager.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
setResourceResolutionLoggingEnabled
|
core/java/android/content/res/AssetManager.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
private int calculateHints() {
int hints = 0;
for (int i = mListenersDisablingEffects.size() - 1; i >= 0; --i) {
int hint = mListenersDisablingEffects.keyAt(i);
ArraySet<ManagedServiceInfo> serviceInfoList = mListenersDisablingEffects.valueAt(i);
if (!serviceInfoList.isEmpty()) {
hints |= hint;
}
}
return hints;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: calculateHints
File: services/core/java/com/android/server/notification/NotificationManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-284"
] |
CVE-2016-3884
|
MEDIUM
| 4.3
|
android
|
calculateHints
|
services/core/java/com/android/server/notification/NotificationManagerService.java
|
61e9103b5725965568e46657f4781dd8f2e5b623
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
@Deprecated
public boolean isPermissionEnforced(String permission) {
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isPermissionEnforced
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
|
isPermissionEnforced
|
services/core/java/com/android/server/pm/PackageManagerService.java
|
a75537b496e9df71c74c1d045ba5569631a16298
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getCanonicalDocumentName(String documentName)
{
@SuppressWarnings("unchecked")
EntityReferenceResolver<String> resolver = Utils.getComponent(EntityReferenceResolver.TYPE_STRING, "current");
@SuppressWarnings("unchecked")
EntityReferenceSerializer<String> serializer = Utils.getComponent(EntityReferenceSerializer.TYPE_STRING);
return serializer.serialize(resolver.resolve(documentName, EntityType.DOCUMENT));
}
|
Vulnerability Classification:
- CWE: CWE-79
- CVE: CVE-2023-29206
- Severity: MEDIUM
- CVSS Score: 5.4
Description: XWIKI-9119: Refactoring of SkinExtensionPlugin
* Provide some tests
Function: getCanonicalDocumentName
File: xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
Repository: xwiki/xwiki-platform
Fixed Code:
private String getCanonicalDocumentName(String documentName)
{
EntityReferenceResolver<String> resolver = getCurrentEntityReferenceResolver();
EntityReferenceSerializer<String> serializer = getDefaultEntityReferenceSerializer();
return serializer.serialize(resolver.resolve(documentName, EntityType.DOCUMENT));
}
|
[
"CWE-79"
] |
CVE-2023-29206
|
MEDIUM
| 5.4
|
xwiki/xwiki-platform
|
getCanonicalDocumentName
|
xwiki-platform-core/xwiki-platform-skin/xwiki-platform-skin-skinx/src/main/java/com/xpn/xwiki/plugin/skinx/AbstractDocumentSkinExtensionPlugin.java
|
fe65bc35d5672dd2505b7ac4ec42aec57d500fbb
| 1
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean isNativePlayerMode() {
return nativePlayer;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isNativePlayerMode
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
|
isNativePlayerMode
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
private OldRendering getOldRendering()
{
if (this.oldRenderingProvider == null) {
this.oldRenderingProvider = Utils.getComponent(OldRendering.TYPE_PROVIDER);
}
return this.oldRenderingProvider.get();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOldRendering
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
|
getOldRendering
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
public static Collection<LogMessage> parseLog(File flog, int begin, int end, String str) throws IOException {
// log.debug("parseLog({}, {}, {}, {})", new Object[] { flog, begin, end, str });
ArrayList<LogMessage> al = new ArrayList<LogMessage>();
int i = 0;
if (begin < 0 || end < 0) {
int maxLines = 0;
for (LineIterator lit = FileUtils.lineIterator(flog); lit.hasNext(); ) {
lit.nextLine();
maxLines++;
}
if (begin < 0) {
begin += maxLines;
}
if (end < 0) {
end += maxLines + 1;
}
}
for (LineIterator lit = FileUtils.lineIterator(flog); lit.hasNext(); ) {
String line = lit.nextLine();
int idx = (line != null) ? line.indexOf(str) : -1;
i++;
if (idx > -1 && i >= begin && i <= end) {
if (idx > -1 && !str.isEmpty()) {
StringBuilder sb = new StringBuilder();
sb.append(line.substring(0, idx));
sb.append("<span class=\"highlight\" style=\"font-weight: bold\">");
sb.append(line.substring(idx, idx + str.length()));
sb.append("</span>");
sb.append(line.substring(idx + str.length()));
line = sb.toString().replace(",", ", ");
}
LogMessage lm = new LogMessage();
lm.setLine(i);
lm.setMessage(line);
al.add(lm);
}
}
// log.debug("parseLog: {}", al);
return al;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: parseLog
File: src/main/java/com/openkm/util/FormatUtil.java
Repository: openkm/document-management-system
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2022-40317
|
MEDIUM
| 5.4
|
openkm/document-management-system
|
parseLog
|
src/main/java/com/openkm/util/FormatUtil.java
|
870d518f7de349c3fa4c7b9883789fdca4590c4e
| 0
|
Analyze the following code function for security vulnerabilities
|
public void enableHostnameVerification() {
enableHostnameVerificationForNio();
enableHostnameVerificationForBlockingIo();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enableHostnameVerification
File: src/main/java/com/rabbitmq/client/ConnectionFactory.java
Repository: rabbitmq/rabbitmq-java-client
The code follows secure coding practices.
|
[
"CWE-400"
] |
CVE-2023-46120
|
HIGH
| 7.5
|
rabbitmq/rabbitmq-java-client
|
enableHostnameVerification
|
src/main/java/com/rabbitmq/client/ConnectionFactory.java
|
714aae602dcae6cb4b53cadf009323ebac313cc8
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void configure(String folder) {
Assert.notNull(folder, "'folder' must not be null");
if (!staticResourcesSet) {
try {
ClassPathResource resource = new ClassPathResource(folder);
if (configureJarCase(folder, resource)) {
return;
}
if (!resource.getFile().isDirectory()) {
LOG.error("Static resource location must be a folder");
return;
}
if (staticResourceHandlers == null) {
staticResourceHandlers = new ArrayList<>();
}
staticResourceHandlers.add(new ClassPathResourceHandler(folder, "index.html"));
LOG.info("StaticResourceHandler configured with folder = " + folder);
} catch (IOException e) {
LOG.error("Error when creating StaticResourceHandler", e);
}
staticResourcesSet = true;
}
}
|
Vulnerability Classification:
- CWE: CWE-22
- CVE: CVE-2016-9177
- Severity: MEDIUM
- CVSS Score: 5.0
Description: Fix for #700 - Arbitrary File Read Vulnerability
Function: configure
File: src/main/java/spark/staticfiles/StaticFilesConfiguration.java
Repository: perwendel/spark
Fixed Code:
public synchronized void configure(String folder) {
Assert.notNull(folder, "'folder' must not be null");
if (!staticResourcesSet) {
try {
ClassPathResource resource = new ClassPathResource(folder);
if (configureJarCase(folder, resource)) {
return;
}
if (!resource.getFile().isDirectory()) {
LOG.error("Static resource location must be a folder");
return;
}
if (staticResourceHandlers == null) {
staticResourceHandlers = new ArrayList<>();
}
staticResourceHandlers.add(new ClassPathResourceHandler(folder, "index.html"));
LOG.info("StaticResourceHandler configured with folder = " + folder);
} catch (IOException e) {
LOG.error("Error when creating StaticResourceHandler", e);
}
StaticFilesFolder.localConfiguredTo(folder);
staticResourcesSet = true;
}
}
|
[
"CWE-22"
] |
CVE-2016-9177
|
MEDIUM
| 5
|
perwendel/spark
|
configure
|
src/main/java/spark/staticfiles/StaticFilesConfiguration.java
|
26b57d0596ee73c14c558463943ef0857e53b91f
| 1
|
Analyze the following code function for security vulnerabilities
|
public void setContainerDataSource(Container.Indexed container) {
defaultContainer = false;
internalSetContainerDataSource(container);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setContainerDataSource
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
|
setContainerDataSource
|
server/src/main/java/com/vaadin/ui/Grid.java
|
b9ba10adaa06a0977c531f878c3f0046b67f9cc0
| 0
|
Analyze the following code function for security vulnerabilities
|
private PendingIntent createPendingIntent(@NonNull Intent intent, @NonNull Notification notification, @NonNull User user) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
return PendingIntent.getActivity(context, notification.getNotificationId(),
putExtrasToIntent(intent, notification, user),
PendingIntent.FLAG_ONE_SHOT);
}
|
Vulnerability Classification:
- CWE: CWE-732
- CVE: CVE-2022-24886
- Severity: LOW
- CVSS Score: 2.1
Description: Make more PendingIntents immutable
This should be all of them. Picked up by lint.
Signed-off-by: Álvaro Brey Vilas <alvaro.brey@nextcloud.com>
Function: createPendingIntent
File: src/main/java/com/nextcloud/client/integrations/deck/DeckApiImpl.java
Repository: nextcloud/android
Fixed Code:
private PendingIntent createPendingIntent(@NonNull Intent intent, @NonNull Notification notification, @NonNull User user) {
intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);
return PendingIntent.getActivity(context, notification.getNotificationId(),
putExtrasToIntent(intent, notification, user),
PendingIntent.FLAG_ONE_SHOT | PendingIntent.FLAG_IMMUTABLE);
}
|
[
"CWE-732"
] |
CVE-2022-24886
|
LOW
| 2.1
|
nextcloud/android
|
createPendingIntent
|
src/main/java/com/nextcloud/client/integrations/deck/DeckApiImpl.java
|
c01fa0b17050cdcf77a468cc22f4071eae29d464
| 1
|
Analyze the following code function for security vulnerabilities
|
private static String getKeyNameFromMethod(Method method) {
final int ignoreDepth = getAnnotationDepth(method, JSONPropertyIgnore.class);
if (ignoreDepth > 0) {
final int forcedNameDepth = getAnnotationDepth(method, JSONPropertyName.class);
if (forcedNameDepth < 0 || ignoreDepth <= forcedNameDepth) {
// the hierarchy asked to ignore, and the nearest name override
// was higher or non-existent
return null;
}
}
JSONPropertyName annotation = getAnnotation(method, JSONPropertyName.class);
if (annotation != null && annotation.value() != null && !annotation.value().isEmpty()) {
return annotation.value();
}
String key;
final String name = method.getName();
if (name.startsWith("get") && name.length() > 3) {
key = name.substring(3);
} else if (name.startsWith("is") && name.length() > 2) {
key = name.substring(2);
} else {
return null;
}
// if the first letter in the key is not uppercase, then skip.
// This is to maintain backwards compatibility before PR406
// (https://github.com/stleary/JSON-java/pull/406/)
if (key.length() == 0 || Character.isLowerCase(key.charAt(0))) {
return null;
}
if (key.length() == 1) {
key = key.toLowerCase(Locale.ROOT);
} else if (!Character.isUpperCase(key.charAt(1))) {
key = key.substring(0, 1).toLowerCase(Locale.ROOT) + key.substring(1);
}
return key;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getKeyNameFromMethod
File: src/main/java/org/json/JSONObject.java
Repository: stleary/JSON-java
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2023-5072
|
HIGH
| 7.5
|
stleary/JSON-java
|
getKeyNameFromMethod
|
src/main/java/org/json/JSONObject.java
|
661114c50dcfd53bb041aab66f14bb91e0a87c8a
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override public int read(byte[] buffer, int byteOffset, int byteCount) throws IOException {
Arrays.checkOffsetAndCount(buffer.length, byteOffset, byteCount);
if (byteCount == 0) {
return 0;
}
checkReadPrimitiveTypes();
return primitiveData.read(buffer, byteOffset, byteCount);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: read
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
read
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public void initTargetUrlConfig() {
urlButton.addActionListener(e -> {
urlFileField.setText(null);
rawFileField.setText(null);
String url = urlField.getText();
logger.info(String.format("target url: %s", url));
xrayCmd.setInputPrefix("--url");
xrayCmd.setInput(url);
if (LANG == CHINESE) {
JOptionPane.showMessageDialog(null, "设置URL成功");
} else {
JOptionPane.showMessageDialog(null, "Success");
}
});
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: initTargetUrlConfig
File: src/main/java/com/chaitin/xray/form/MainForm.java
Repository: 4ra1n/super-xray
The code follows secure coding practices.
|
[
"CWE-502"
] |
CVE-2022-41958
|
HIGH
| 7.8
|
4ra1n/super-xray
|
initTargetUrlConfig
|
src/main/java/com/chaitin/xray/form/MainForm.java
|
4d0d59663596db03f39d7edd2be251d48b52dcfc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public boolean onMenuItemActionExpand(MenuItem item) {
mSearchEditText.post(() -> {
updateSearchViewHint();
mSearchEditText.requestFocus();
if (oneShotKeyboardSuppress.compareAndSet(true, false)) {
return;
}
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
if (imm != null) {
imm.showSoftInput(mSearchEditText, InputMethodManager.SHOW_IMPLICIT);
}
});
return true;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onMenuItemActionExpand
File: src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
Repository: iNPUTmice/Conversations
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2018-18467
|
MEDIUM
| 5
|
iNPUTmice/Conversations
|
onMenuItemActionExpand
|
src/main/java/eu/siacs/conversations/ui/StartConversationActivity.java
|
7177c523a1b31988666b9337249a4f1d0c36f479
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void copyTransform(Object src, Object dest) {
CN1Matrix4f t1 = (CN1Matrix4f) src;
CN1Matrix4f t2 = (CN1Matrix4f) dest;
t2.setData(t1.getData());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyTransform
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
|
copyTransform
|
Ports/Android/src/com/codename1/impl/android/AndroidImplementation.java
|
dad49c9ef26a598619fc48d2697151a02987d478
| 0
|
Analyze the following code function for security vulnerabilities
|
boolean factoryReset() {
enforceCallingOrSelfPermission(BLUETOOTH_PRIVILEGED, "Need BLUETOOTH permission");
return factoryResetNative();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: factoryReset
File: src/com/android/bluetooth/btservice/AdapterService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-362",
"CWE-20"
] |
CVE-2016-3760
|
MEDIUM
| 5.4
|
android
|
factoryReset
|
src/com/android/bluetooth/btservice/AdapterService.java
|
122feb9a0b04290f55183ff2f0384c6c53756bd8
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onStart() {
publishBinderService(Context.ACTIVITY_TASK_SERVICE, mService);
mService.start();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onStart
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
|
onStart
|
services/core/java/com/android/server/wm/ActivityTaskManagerService.java
|
1120bc7e511710b1b774adf29ba47106292365e7
| 0
|
Analyze the following code function for security vulnerabilities
|
@RequestMapping("/services/public/category/{store}/{language}")
@ResponseBody
public List<ReadableCategory> getCategories(@PathVariable final String language, @PathVariable final String store, Model model, HttpServletRequest request, HttpServletResponse response) throws Exception {
Map<String,Language> langs = languageService.getLanguagesMap();
Language l = langs.get(language);
if(l==null) {
l = languageService.getByCode(Constants.DEFAULT_LANGUAGE);
}
MerchantStore merchantStore = (MerchantStore)request.getAttribute(Constants.MERCHANT_STORE);
if(merchantStore!=null) {
if(!merchantStore.getCode().equals(store)) {
merchantStore = null; //reset for the current request
}
}
if(merchantStore== null) {
merchantStore = merchantStoreService.getByCode(store);
}
if(merchantStore==null) {
LOGGER.error("Merchant store is null for code " + store);
response.sendError(503, "Merchant store is null for code " + store);//TODO localized message
return null;
}
List<Category> categories = categoryService.listByStore(merchantStore, l);
ReadableCategoryPopulator populator = new ReadableCategoryPopulator();
List<ReadableCategory> returnCategories = new ArrayList<ReadableCategory>();
for(Category category : categories) {
ReadableCategory categoryProxy = populator.populate(category, new ReadableCategory(), merchantStore, l);
returnCategories.add(categoryProxy);
}
return returnCategories;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCategories
File: sm-shop/src/main/java/com/salesmanager/shop/store/controller/category/ShoppingCategoryController.java
Repository: shopizer-ecommerce/shopizer
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2021-33561
|
LOW
| 3.5
|
shopizer-ecommerce/shopizer
|
getCategories
|
sm-shop/src/main/java/com/salesmanager/shop/store/controller/category/ShoppingCategoryController.java
|
197f8c78c8f673b957e41ca2c823afc654c19271
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isAffiliatedUser() {
throwIfParentInstance("isAffiliatedUser");
try {
return mService.isCallingUserAffiliated();
} catch (RemoteException e) {
throw e.rethrowFromSystemServer();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isAffiliatedUser
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
|
isAffiliatedUser
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void stopDozing() {
if (mDozingRequested) {
mDozingRequested = false;
DozeLog.traceDozing(mContext, mDozing);
updateDozing();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: stopDozing
File: packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2017-0822
|
HIGH
| 7.5
|
android
|
stopDozing
|
packages/SystemUI/src/com/android/systemui/statusbar/phone/StatusBar.java
|
c574568aaede7f652432deb7707f20ae54bbdf9a
| 0
|
Analyze the following code function for security vulnerabilities
|
public final Object readObject() throws OptionalDataException,
ClassNotFoundException, IOException {
return readObject(false);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readObject
File: luni/src/main/java/java/io/ObjectInputStream.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2014-7911
|
HIGH
| 7.2
|
android
|
readObject
|
luni/src/main/java/java/io/ObjectInputStream.java
|
738c833d38d41f8f76eb7e77ab39add82b1ae1e2
| 0
|
Analyze the following code function for security vulnerabilities
|
public Page<E> setCount(boolean count) {
this.count = count;
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setCount
File: src/main/java/com/github/pagehelper/Page.java
Repository: pagehelper/Mybatis-PageHelper
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-28111
|
HIGH
| 7.5
|
pagehelper/Mybatis-PageHelper
|
setCount
|
src/main/java/com/github/pagehelper/Page.java
|
554a524af2d2b30d09505516adc412468a84d8fa
| 0
|
Analyze the following code function for security vulnerabilities
|
private ProcessRecord findAppProcess(IBinder app, String reason) {
if (app == null) {
return null;
}
synchronized (mProcLock) {
return mProcessList.findAppProcessLOSP(app, reason);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: findAppProcess
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
findAppProcess
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onChosenLockSaveFinished(boolean wasSecureBefore, Intent resultData) {
getActivity().setResult(RESULT_FINISHED, resultData);
if (mChosenPassword != null) {
mChosenPassword.zeroize();
}
if (mCurrentCredential != null) {
mCurrentCredential.zeroize();
}
if (mFirstPassword != null) {
mFirstPassword.zeroize();
}
mPasswordEntry.setText("");
if (!wasSecureBefore) {
Intent intent = getRedactionInterstitialIntent(getActivity());
if (intent != null) {
startActivity(intent);
}
}
getActivity().finish();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onChosenLockSaveFinished
File: src/com/android/settings/password/ChooseLockPassword.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-40117
|
HIGH
| 7.8
|
android
|
onChosenLockSaveFinished
|
src/com/android/settings/password/ChooseLockPassword.java
|
11815817de2f2d70fe842b108356a1bc75d44ffb
| 0
|
Analyze the following code function for security vulnerabilities
|
private final int _nextChunkedByte() throws IOException {
int inPtr = _inputPtr;
// NOTE: _chunkEnd less than or equal to _inputEnd
if (inPtr >= _chunkEnd) {
return _nextChunkedByte2();
}
int ch = _inputBuffer[inPtr];
_inputPtr = inPtr+1;
return ch;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: _nextChunkedByte
File: cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
Repository: FasterXML/jackson-dataformats-binary
The code follows secure coding practices.
|
[
"CWE-770"
] |
CVE-2020-28491
|
MEDIUM
| 5
|
FasterXML/jackson-dataformats-binary
|
_nextChunkedByte
|
cbor/src/main/java/com/fasterxml/jackson/dataformat/cbor/CBORParser.java
|
de072d314af8f5f269c8abec6930652af67bc8e6
| 0
|
Analyze the following code function for security vulnerabilities
|
@NonNull
public Builder setSubText(CharSequence text) {
mN.extras.putCharSequence(EXTRA_SUB_TEXT, safeCharSequence(text));
return this;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setSubText
File: core/java/android/app/Notification.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-862"
] |
CVE-2023-21288
|
MEDIUM
| 5.5
|
android
|
setSubText
|
core/java/android/app/Notification.java
|
726247f4f53e8cc0746175265652fa415a123c0c
| 0
|
Analyze the following code function for security vulnerabilities
|
private static ArrayList<ComponentName> readLastDonePreBootReceivers() {
ArrayList<ComponentName> lastDoneReceivers = new ArrayList<ComponentName>();
File file = getCalledPreBootReceiversFile();
FileInputStream fis = null;
try {
fis = new FileInputStream(file);
DataInputStream dis = new DataInputStream(new BufferedInputStream(fis, 2048));
int fvers = dis.readInt();
if (fvers == LAST_PREBOOT_DELIVERED_FILE_VERSION) {
String vers = dis.readUTF();
String codename = dis.readUTF();
String build = dis.readUTF();
if (android.os.Build.VERSION.RELEASE.equals(vers)
&& android.os.Build.VERSION.CODENAME.equals(codename)
&& android.os.Build.VERSION.INCREMENTAL.equals(build)) {
int num = dis.readInt();
while (num > 0) {
num--;
String pkg = dis.readUTF();
String cls = dis.readUTF();
lastDoneReceivers.add(new ComponentName(pkg, cls));
}
}
}
} catch (FileNotFoundException e) {
} catch (IOException e) {
Slog.w(TAG, "Failure reading last done pre-boot receivers", e);
} finally {
if (fis != null) {
try {
fis.close();
} catch (IOException e) {
}
}
}
return lastDoneReceivers;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: readLastDonePreBootReceivers
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
|
readLastDonePreBootReceivers
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
aaa0fee0d7a8da347a0c47cef5249c70efee209e
| 0
|
Analyze the following code function for security vulnerabilities
|
public Registration addSessionDestroyListener(
SessionDestroyListener listener) {
return Registration.addAndRemove(sessionDestroyListeners, listener);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: addSessionDestroyListener
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
|
addSessionDestroyListener
|
flow-server/src/main/java/com/vaadin/flow/server/VaadinService.java
|
621ef1b322737d963bee624b2d2e38cd739903d9
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public ParceledListSlice<ActivityManager.RecentTaskInfo> getRecentTasks(int maxNum, int flags,
int userId) {
return mActivityTaskManager.getRecentTasks(maxNum, flags, userId);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getRecentTasks
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
getRecentTasks
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
protected long getMaxBinaryBufferSize() {
return session.getMaxBinaryMessageBufferSize();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMaxBinaryBufferSize
File: websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
Repository: undertow-io/undertow
The code follows secure coding practices.
|
[
"CWE-401"
] |
CVE-2021-3690
|
HIGH
| 7.5
|
undertow-io/undertow
|
getMaxBinaryBufferSize
|
websockets-jsr/src/main/java/io/undertow/websockets/jsr/FrameHandler.java
|
c7e84a0b7efced38506d7d1dfea5902366973877
| 0
|
Analyze the following code function for security vulnerabilities
|
public Page<Object[]> processList(Page<Object[]> page, String category) {
/*
* 保存两个对象,一个是ProcessDefinition(流程定义),一个是Deployment(流程部署)
*/
ProcessDefinitionQuery processDefinitionQuery = repositoryService.createProcessDefinitionQuery()
.latestVersion().active().orderByProcessDefinitionKey().asc();
if (StringUtils.isNotEmpty(category)){
processDefinitionQuery.processDefinitionCategory(category);
}
page.setCount(processDefinitionQuery.count());
List<ProcessDefinition> processDefinitionList = processDefinitionQuery.listPage(page.getFirstResult(), page.getMaxResults());
for (ProcessDefinition processDefinition : processDefinitionList) {
String deploymentId = processDefinition.getDeploymentId();
Deployment deployment = repositoryService.createDeploymentQuery().deploymentId(deploymentId).singleResult();
page.getList().add(new Object[]{processDefinition, deployment});
}
return page;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: processList
File: src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
Repository: thinkgem/jeesite
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-34601
|
CRITICAL
| 9.8
|
thinkgem/jeesite
|
processList
|
src/main/java/com/thinkgem/jeesite/modules/act/service/ActTaskService.java
|
30750011b49f7c8d45d0f3ab13ed3a1a422655bb
| 0
|
Analyze the following code function for security vulnerabilities
|
@Nullable
Point getMinDimensions() {
final ActivityInfo.WindowLayout windowLayout = info.windowLayout;
if (windowLayout == null) {
return null;
}
return new Point(windowLayout.minWidth, windowLayout.minHeight);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMinDimensions
File: services/core/java/com/android/server/wm/ActivityRecord.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21145
|
HIGH
| 7.8
|
android
|
getMinDimensions
|
services/core/java/com/android/server/wm/ActivityRecord.java
|
44aeef1b82ecf21187d4903c9e3666a118bdeaf3
| 0
|
Analyze the following code function for security vulnerabilities
|
public Map<String, String> getMap(String key)
{
List<String> list = getProperty(key, List.class);
Map<String, String> mapping;
if (list != null && !list.isEmpty()) {
mapping = new HashMap<>(list.size());
for (String listItem : list) {
int index = listItem.indexOf('=');
if (index != -1) {
mapping.put(listItem.substring(0, index), listItem.substring(index + 1));
}
}
} else {
mapping = null;
}
return mapping;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getMap
File: oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
Repository: xwiki-contrib/oidc
The code follows secure coding practices.
|
[
"CWE-287"
] |
CVE-2022-39387
|
HIGH
| 7.5
|
xwiki-contrib/oidc
|
getMap
|
oidc-authenticator/src/main/java/org/xwiki/contrib/oidc/auth/internal/OIDCClientConfiguration.java
|
0247af1417925b9734ab106ad7cd934ee870ac89
| 0
|
Analyze the following code function for security vulnerabilities
|
public void setAttributeList(AttributeList list) {
attributes.clear();
for (Attribute attribute : list.attrs) {
attributes.put(attribute.name, attribute.value);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setAttributeList
File: base/common/src/main/java/com/netscape/certsrv/base/RESTMessage.java
Repository: dogtagpki/pki
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2022-2414
|
HIGH
| 7.5
|
dogtagpki/pki
|
setAttributeList
|
base/common/src/main/java/com/netscape/certsrv/base/RESTMessage.java
|
16deffdf7548e305507982e246eb9fd1eac414fd
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getDefaultCustomFields(String projectId) {
IssueTemplateDao template = trackIssueTemplateService.getTemplate(projectId);
List<CustomFieldDao> customFields = trackCustomFieldTemplateService.getCustomFieldByTemplateId(template.getId());
return getCustomFieldsValuesString(customFields);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getDefaultCustomFields
File: test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
Repository: metersphere
The code follows secure coding practices.
|
[
"CWE-918"
] |
CVE-2022-23544
|
MEDIUM
| 6.1
|
metersphere
|
getDefaultCustomFields
|
test-track/backend/src/main/java/io/metersphere/service/IssuesService.java
|
d0f95b50737c941b29d507a4cc3545f2dc6ab121
| 0
|
Analyze the following code function for security vulnerabilities
|
public synchronized void updateInt(String columnName, int x) throws SQLException {
updateInt(findColumn(columnName), x);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateInt
File: pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
Repository: pgjdbc
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2022-31197
|
HIGH
| 8
|
pgjdbc
|
updateInt
|
pgjdbc/src/main/java/org/postgresql/jdbc/PgResultSet.java
|
739e599d52ad80f8dcd6efedc6157859b1a9d637
| 0
|
Analyze the following code function for security vulnerabilities
|
protected void copyAttrsFromParentChannel(Channel parent, Channel child)
{
AttributeKey[] attributesToCopy = {
SourceAddressChannelHandler.ATTR_LOCAL_ADDRESS,
SourceAddressChannelHandler.ATTR_LOCAL_INET_ADDR,
SourceAddressChannelHandler.ATTR_SOURCE_ADDRESS,
SourceAddressChannelHandler.ATTR_SOURCE_INET_ADDR,
SourceAddressChannelHandler.ATTR_SERVER_LOCAL_ADDRESS,
SourceAddressChannelHandler.ATTR_SERVER_LOCAL_PORT,
SourceAddressChannelHandler.ATTR_PROXY_PROTOCOL_DESTINATION_ADDRESS,
PROTOCOL_NAME,
SslHandshakeInfoHandler.ATTR_SSL_INFO,
HAProxyMessageChannelHandler.ATTR_HAPROXY_MESSAGE,
HAProxyMessageChannelHandler.ATTR_HAPROXY_VERSION,
BaseZuulChannelInitializer.ATTR_CHANNEL_CONFIG
};
for (AttributeKey key : attributesToCopy) {
copyAttrFromParentChannel(parent, child, key);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: copyAttrsFromParentChannel
File: zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java
Repository: Netflix/zuul
The code follows secure coding practices.
|
[
"CWE-444"
] |
CVE-2021-21295
|
LOW
| 2.6
|
Netflix/zuul
|
copyAttrsFromParentChannel
|
zuul-core/src/main/java/com/netflix/zuul/netty/server/http2/Http2StreamInitializer.java
|
033d3c2de354e249f6d775bde8b67b0997888958
| 0
|
Analyze the following code function for security vulnerabilities
|
public void rOpen() throws SQLException {
db = dbHelper.getReadableDatabase();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: rOpen
File: app/src/main/java/com/dimtion/shaarlier/TagsSource.java
Repository: dimtion/Shaarlier
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2015-10076
|
MEDIUM
| 5.2
|
dimtion/Shaarlier
|
rOpen
|
app/src/main/java/com/dimtion/shaarlier/TagsSource.java
|
3d1d9b239d9b3cd87e8bed45a0f02da583ad371e
| 0
|
Analyze the following code function for security vulnerabilities
|
public boolean isKeyPairGrantedToWifiAuth(@NonNull String alias) {
throwIfParentInstance("isKeyPairGrantedToWifiAuth");
try {
return mService.isKeyPairGrantedToWifiAuth(mContext.getPackageName(), alias);
} catch (RemoteException e) {
e.rethrowFromSystemServer();
}
return false;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: isKeyPairGrantedToWifiAuth
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
|
isKeyPairGrantedToWifiAuth
|
core/java/android/app/admin/DevicePolicyManager.java
|
e2e05f488da6abc765a62e7faf10cb74e729732e
| 0
|
Analyze the following code function for security vulnerabilities
|
private Job startCreateJob(EntityReference entityReference, EditForm editForm) throws XWikiException
{
if (StringUtils.isBlank(editForm.getTemplate())) {
// No template specified, nothing more to do.
return null;
}
// If a template is set in the request, then this is a create action which needs to be handled by a create job,
// but skipping the target document, which is now already saved by the save action.
RefactoringScriptService refactoring =
(RefactoringScriptService) Utils.getComponent(ScriptService.class, "refactoring");
CreateRequest request = refactoring.getRequestFactory().createCreateRequest(Arrays.asList(entityReference));
request.setCheckAuthorRights(false);
// Set the target document.
request.setEntityReferences(Arrays.asList(entityReference));
// Set the template to use.
DocumentReferenceResolver<String> resolver =
Utils.getComponent(DocumentReferenceResolver.TYPE_STRING, "currentmixed");
EntityReference templateReference = resolver.resolve(editForm.getTemplate());
request.setTemplateReference(templateReference);
// We`ve already created and populated the fields of the target document, focus only on the remaining children
// specified in the template.
request.setSkippedEntities(Arrays.asList(entityReference));
Job createJob = refactoring.create(request);
if (createJob != null) {
return createJob;
} else {
throw new XWikiException(String.format("Failed to schedule the create job for [%s]", entityReference),
refactoring.getLastError());
}
}
|
Vulnerability Classification:
- CWE: CWE-862
- CVE: CVE-2022-23617
- Severity: MEDIUM
- CVSS Score: 4.0
Description: XWIKI-18430: Page content is revealed to users that don't have rights if used as a template for the creation of another page
Function: startCreateJob
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
Repository: xwiki/xwiki-platform
Fixed Code:
private Job startCreateJob(EntityReference entityReference, EditForm editForm) throws XWikiException
{
DocumentReference templateReference = resolveTemplate(editForm.getTemplate());
if (templateReference == null) {
// No template specified, nothing more to do.
return null;
}
// If a template is set in the request, then this is a create action which needs to be handled by a create job,
// but skipping the target document, which is now already saved by the save action.
RefactoringScriptService refactoring =
(RefactoringScriptService) Utils.getComponent(ScriptService.class, "refactoring");
CreateRequest request = refactoring.getRequestFactory().createCreateRequest(Arrays.asList(entityReference));
request.setCheckAuthorRights(false);
// Set the target document.
request.setEntityReferences(Arrays.asList(entityReference));
// Set the template to use.
request.setTemplateReference(templateReference);
// We`ve already created and populated the fields of the target document, focus only on the remaining children
// specified in the template.
request.setSkippedEntities(Arrays.asList(entityReference));
Job createJob = refactoring.create(request);
if (createJob != null) {
return createJob;
} else {
throw new XWikiException(String.format("Failed to schedule the create job for [%s]", entityReference),
refactoring.getLastError());
}
}
|
[
"CWE-862"
] |
CVE-2022-23617
|
MEDIUM
| 4
|
xwiki/xwiki-platform
|
startCreateJob
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/web/SaveAction.java
|
30c52b01559b8ef5ed1035dac7c34aaf805764d5
| 1
|
Analyze the following code function for security vulnerabilities
|
protected void receiveDirect(Message message) {
if (_logger.isDebugEnabled()) {
_logger.debug("Received direct message {}", message);
}
Map<String, Object> data = message.getDataAsMap();
Boolean presence = (Boolean)data.get(SetiPresence.PRESENCE_FIELD);
if (presence != null) {
receivePresence(data);
} else {
receiveMessage(data);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: receiveDirect
File: cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
Repository: cometd
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-24721
|
MEDIUM
| 5.5
|
cometd
|
receiveDirect
|
cometd-java/cometd-java-oort/src/main/java/org/cometd/oort/Seti.java
|
bb445a143fbf320f17c62e340455cd74acfb5929
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void onPolicyChanged() {
if (mNetworkAgent == null) {
return;
}
// Update the NetworkAgent's NetworkCapabilities which will merge the current
// capabilities with VcnManagementService's underlying Network policy.
Log.i(getTag(), "VCN policy changed, updating NetworkCapabilities.");
updateCapabilities();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: onPolicyChanged
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
|
onPolicyChanged
|
service/java/com/android/server/wifi/ClientModeImpl.java
|
72e903f258b5040b8f492cf18edd124b5a1ac770
| 0
|
Analyze the following code function for security vulnerabilities
|
private void dumpSettings(Cursor cursor, PrintWriter pw) {
if (cursor == null || !cursor.moveToFirst()) {
return;
}
final int idColumnIdx = cursor.getColumnIndex(Settings.NameValueTable._ID);
final int nameColumnIdx = cursor.getColumnIndex(Settings.NameValueTable.NAME);
final int valueColumnIdx = cursor.getColumnIndex(Settings.NameValueTable.VALUE);
do {
pw.append("_id:").append(toDumpString(cursor.getString(idColumnIdx)));
pw.append(" name:").append(toDumpString(cursor.getString(nameColumnIdx)));
pw.append(" value:").append(toDumpString(cursor.getString(valueColumnIdx)));
pw.println();
} while (cursor.moveToNext());
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: dumpSettings
File: packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3876
|
HIGH
| 7.2
|
android
|
dumpSettings
|
packages/SettingsProvider/src/com/android/providers/settings/SettingsProvider.java
|
91fc934bb2e5ea59929bb2f574de6db9b5100745
| 0
|
Analyze the following code function for security vulnerabilities
|
private int displayPackageFilePath(String pckg) {
try {
PackageInfo info = mPm.getPackageInfo(pckg, 0, 0);
if (info != null && info.applicationInfo != null) {
System.out.print("package:");
System.out.println(info.applicationInfo.sourceDir);
if (!ArrayUtils.isEmpty(info.applicationInfo.splitSourceDirs)) {
for (String splitSourceDir : info.applicationInfo.splitSourceDirs) {
System.out.print("package:");
System.out.println(splitSourceDir);
}
}
return 0;
}
} catch (RemoteException e) {
System.err.println(e.toString());
System.err.println(PM_NOT_RUNNING_ERR);
}
return 1;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: displayPackageFilePath
File: cmds/pm/src/com/android/commands/pm/Pm.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3833
|
HIGH
| 9.3
|
android
|
displayPackageFilePath
|
cmds/pm/src/com/android/commands/pm/Pm.java
|
4e4743a354e26467318b437892a9980eb9b8328a
| 0
|
Analyze the following code function for security vulnerabilities
|
private String fixIncorrectWebjarPath(String requestFilename) {
return INCORRECT_WEBJAR_PATH_REGEX.matcher(requestFilename)
.replaceAll("/webjars/");
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: fixIncorrectWebjarPath
File: flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-22"
] |
CVE-2020-36321
|
MEDIUM
| 5
|
vaadin/flow
|
fixIncorrectWebjarPath
|
flow-server/src/main/java/com/vaadin/flow/server/StaticFileServer.java
|
6ae6460ca4f3a9b50bd46fbf49c807fe67718307
| 0
|
Analyze the following code function for security vulnerabilities
|
@VisibleForTesting
static Intent updateActionIntent(Account account, Uri messageUri, int action, Intent intent) {
intent.putExtra(EXTRA_FROM_EMAIL_TASK, true);
intent.putExtra(EXTRA_ACTION, action);
intent.putExtra(Utils.EXTRA_ACCOUNT, account);
intent.putExtra(EXTRA_IN_REFERENCE_TO_MESSAGE_URI, messageUri);
return intent;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: updateActionIntent
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
|
updateActionIntent
|
src/com/android/mail/compose/ComposeActivity.java
|
0d9dfd649bae9c181e3afc5d571903f1eb5dc46f
| 0
|
Analyze the following code function for security vulnerabilities
|
public <E> List<E> getListeners(Class<E> handler) {
List<E> registeredListeners = (List<E>) listeners
.computeIfAbsent(handler, key -> new ArrayList<>());
return Collections
.unmodifiableList(new ArrayList<>(registeredListeners));
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getListeners
File: flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
Repository: vaadin/flow
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2023-25499
|
MEDIUM
| 6.5
|
vaadin/flow
|
getListeners
|
flow-server/src/main/java/com/vaadin/flow/component/internal/UIInternals.java
|
428cc97eaa9c89b1124e39f0089bbb741b6b21cc
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void endProcessing() {
try {
super.endProcessing();
} catch (final LoggedException e) {
throw e;
} catch (final Throwable e) {
throw ProcessException.wrap(e);
} finally {
// Return the parser factory to the pool if we have used one.
if (poolItem != null && parserFactoryPool != null) {
parserFactoryPool.returnObject(poolItem, usePool);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: endProcessing
File: stroom-pipeline/src/main/java/stroom/pipeline/server/parser/XMLFragmentParser.java
Repository: gchq/stroom
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2018-1000651
|
HIGH
| 7.5
|
gchq/stroom
|
endProcessing
|
stroom-pipeline/src/main/java/stroom/pipeline/server/parser/XMLFragmentParser.java
|
ba30ffd415bd7d32ee40ba4b04035267ce80b499
| 0
|
Analyze the following code function for security vulnerabilities
|
private void cleanupDisabledPackageTasksLocked(String packageName, Set<String> filterByClasses,
int userId) {
for (int i = mRecentTasks.size() - 1; i >= 0; i--) {
TaskRecord tr = mRecentTasks.get(i);
if (userId != UserHandle.USER_ALL && tr.userId != userId) {
continue;
}
ComponentName cn = tr.intent.getComponent();
final boolean sameComponent = cn != null && cn.getPackageName().equals(packageName)
&& (filterByClasses == null || filterByClasses.contains(cn.getClassName()));
if (sameComponent) {
removeTaskByIdLocked(tr.taskId, false);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: cleanupDisabledPackageTasksLocked
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-200"
] |
CVE-2016-2500
|
MEDIUM
| 4.3
|
android
|
cleanupDisabledPackageTasksLocked
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
9878bb99b77c3681f0fda116e2964bac26f349c3
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
public void setInputFilter(IInputFilter filter) {
mInputManager.setInputFilter(filter);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: setInputFilter
File: services/core/java/com/android/server/wm/WindowManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-264"
] |
CVE-2016-3875
|
HIGH
| 7.2
|
android
|
setInputFilter
|
services/core/java/com/android/server/wm/WindowManagerService.java
|
69729fa8b13cadbf3173fe1f389fe4f3b7bd0f9c
| 0
|
Analyze the following code function for security vulnerabilities
|
void enforceNotIsolatedOrSdkSandboxCaller(String caller) {
enforceNotIsolatedCaller(caller);
if (Process.isSdkSandboxUid(Binder.getCallingUid())) {
throw new SecurityException("SDK sandbox process not allowed to call " + caller);
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: enforceNotIsolatedOrSdkSandboxCaller
File: services/core/java/com/android/server/am/ActivityManagerService.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-Other"
] |
CVE-2023-21292
|
MEDIUM
| 5.5
|
android
|
enforceNotIsolatedOrSdkSandboxCaller
|
services/core/java/com/android/server/am/ActivityManagerService.java
|
d10b27e539f7bc91c2360d429b9d05f05274670d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static void jsFunction_addAccessAllowDomains(Context cx, Scriptable thisObj,
Object[] args, Function funObj) throws APIManagementException {
String oAuthConsumerKey = args[0].toString();
NativeArray accessAllowDomainsArr = (NativeArray) args[1];
String[] accessAllowDomainsArray = new String[(int) accessAllowDomainsArr.getLength()];
for (Object domain : accessAllowDomainsArr.getIds()) {
int index = (Integer) domain;
accessAllowDomainsArray[index] = (String) accessAllowDomainsArr.get(index, null);
}
// try {
// APIConsumer apiConsumer = getAPIConsumer(thisObj);
// apiConsumer.addAccessAllowDomains(oAuthConsumerKey, accessAllowDomainsArray);
// } catch (APIManagementException e) {
// handleException("Error while adding allowed domains for oauth consumer: " + oAuthConsumerKey, e);
// }
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: jsFunction_addAccessAllowDomains
File: components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
Repository: wso2/carbon-apimgt
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2018-20736
|
LOW
| 3.5
|
wso2/carbon-apimgt
|
jsFunction_addAccessAllowDomains
|
components/apimgt/org.wso2.carbon.apimgt.hostobjects/src/main/java/org/wso2/carbon/apimgt/hostobjects/APIStoreHostObject.java
|
490f2860822f89d745b7c04fa9570bd86bef4236
| 0
|
Analyze the following code function for security vulnerabilities
|
static void escapeJson(final String s, final StringBuilder buf) {
final int length = s.length();
int extra = 0;
// First count how many extra chars we'll need, if any.
for (int i = 0; i < length; i++) {
final char c = s.charAt(i);
switch (c) {
case '"':
case '\\':
case '\b':
case '\f':
case '\n':
case '\r':
case '\t':
extra++;
continue;
}
if (c < 0x001F) {
extra += 4;
}
}
if (extra == 0) {
buf.append(s); // Nothing to escape.
return;
}
buf.ensureCapacity(buf.length() + length + extra);
for (int i = 0; i < length; i++) {
final char c = s.charAt(i);
switch (c) {
case '"': buf.append('\\').append('"'); continue;
case '\\': buf.append('\\').append('\\'); continue;
case '\b': buf.append('\\').append('b'); continue;
case '\f': buf.append('\\').append('f'); continue;
case '\n': buf.append('\\').append('n'); continue;
case '\r': buf.append('\\').append('r'); continue;
case '\t': buf.append('\\').append('t'); continue;
}
if (c < 0x001F) {
buf.append('\\').append('u').append('0').append('0')
.append((char) Const.HEX[(c >>> 4) & 0x0F])
.append((char) Const.HEX[c & 0x0F]);
} else {
buf.append(c);
}
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: escapeJson
File: src/tsd/HttpQuery.java
Repository: OpenTSDB/opentsdb
The code follows secure coding practices.
|
[
"CWE-79"
] |
CVE-2023-25827
|
MEDIUM
| 6.1
|
OpenTSDB/opentsdb
|
escapeJson
|
src/tsd/HttpQuery.java
|
ff02c1e95e60528275f69b31bcbf7b2ac625cea8
| 0
|
Analyze the following code function for security vulnerabilities
|
public String getPackageAuthor()
{
return this.packageAuthor;
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getPackageAuthor
File: xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-611"
] |
CVE-2023-27480
|
HIGH
| 7.7
|
xwiki/xwiki-platform
|
getPackageAuthor
|
xwiki-platform-core/xwiki-platform-xar/xwiki-platform-xar-model/src/main/java/org/xwiki/xar/XarPackage.java
|
e3527b98fdd8dc8179c24dc55e662b2c55199434
| 0
|
Analyze the following code function for security vulnerabilities
|
private static final native long nativeGetStringBlock(long obj);
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: nativeGetStringBlock
File: core/java/android/content/res/XmlBlock.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-415"
] |
CVE-2023-40103
|
HIGH
| 7.8
|
android
|
nativeGetStringBlock
|
core/java/android/content/res/XmlBlock.java
|
c3bc12c484ef3bbca4cec19234437c45af5e584d
| 0
|
Analyze the following code function for security vulnerabilities
|
public static long executeInsert(@NonNull SQLiteDatabase db, @NonNull String sql,
@Nullable Object[] bindArgs) throws SQLException {
Trace.beginSection("executeInsert");
try (SQLiteStatement st = db.compileStatement(sql)) {
bindArgs(st, bindArgs);
return st.executeInsert();
} finally {
Trace.endSection();
}
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: executeInsert
File: src/com/android/providers/media/util/DatabaseUtils.java
Repository: android
The code follows secure coding practices.
|
[
"CWE-89"
] |
CVE-2023-35683
|
MEDIUM
| 5.5
|
android
|
executeInsert
|
src/com/android/providers/media/util/DatabaseUtils.java
|
23d156ed1bed6d2c2b325f0be540d0afca510c49
| 0
|
Analyze the following code function for security vulnerabilities
|
private String getArrayName(final List<Element> prevElements, int args) throws Exception
{
ArrayList<Element> elements = new ArrayList<>(prevElements.size());
elements.addAll(prevElements);
if (args > 1)
{
final StringWriter writer = new StringWriter();
final XmlSerializer serializer = Xml.newSerializer();
serializer.setFeature("http://xmlpull.org/v1/doc/features.html#indent-output", true);
serializer.setOutput(writer);
serializer.startDocument("UTF-8", true);
parseTermArguments(args - 1, elements, serializer);
serializer.endDocument();
}
final Element last = XmlUtils.getLast(elements);
if (last != null)
{
ExpressionProperties p = new ExpressionProperties(last);
if (p.isOperand())
{
return p.text;
}
}
return "";
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getArrayName
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
|
getArrayName
|
app/src/main/java/com/mkulesh/micromath/io/ImportFromSMathStudio.java
|
5c05ac8de16c569ff0a1816f20be235090d3dd9d
| 0
|
Analyze the following code function for security vulnerabilities
|
private Syntax getOutputSyntax()
{
return getRenderingContext().getTargetSyntax();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getOutputSyntax
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
|
getOutputSyntax
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
|
db3d1c62fc5fb59fefcda3b86065d2d362f55164
| 0
|
Analyze the following code function for security vulnerabilities
|
@Override
protected void shutDown() throws Exception {
eventBus.unregister(this);
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: shutDown
File: graylog2-server/src/main/java/org/graylog2/security/UserSessionTerminationService.java
Repository: Graylog2/graylog2-server
The code follows secure coding practices.
|
[
"CWE-613"
] |
CVE-2023-41041
|
LOW
| 3.1
|
Graylog2/graylog2-server
|
shutDown
|
graylog2-server/src/main/java/org/graylog2/security/UserSessionTerminationService.java
|
bb88f3d0b2b0351669ab32c60b595ab7242a3fe3
| 0
|
Analyze the following code function for security vulnerabilities
|
public DocumentReference getCreatorReference()
{
return this.doc.getCreatorReference();
}
|
No Vulnerability Detected:
This code is secure and does not contain known vulnerabilities.
Function: getCreatorReference
File: xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
Repository: xwiki/xwiki-platform
The code follows secure coding practices.
|
[
"CWE-863"
] |
CVE-2022-23615
|
MEDIUM
| 5.5
|
xwiki/xwiki-platform
|
getCreatorReference
|
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/api/Document.java
|
7ab0fe7b96809c7a3881454147598d46a1c9bbbe
| 0
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.