Tag: security
Questions Related to security
-
Code is vulnerable as Resource is not released in the “finally” block
-
Code is vulnerable as Resource is not released at all
-
Code has no vulnerability
-
Option 1 AND Option 2
-
a
-
b
-
c
-
d
-
Option 1 AND Option 2
-
It is returning a value in finally block
-
It is catching Exception
-
OPTION 1 AND Option 2
-
Nothing is wrong
-
Vulnerable to SQL Injection
-
Vulnerable to DoS
-
Vulnerable to Information Disclosure
-
Code is secure
-
Security is handled at OS level by giving only read level privilege so no need to put an extra check here
-
Only problem here is that fileName may not be syntactically incorrect so it should be validated before using it in the function
-
This code can lead to information disclosure attack
-
Java provides enough security by default for IO operations so this code is not vulnerable.
-
Subject.doAs()
-
AccessController.checkPermission()
-
SecurityManager.checkAccess()
-
None of the above
-
The type safety mechanism in the Java language prevents the execution of malicious code
-
Two classes with the same fully qualified name but which are defined by different instances of a class loader are NOT of the same type
-
All signed classes are implicitly trusted and granted full access
-
The principal role of a TrustManager is to determine if presented authentication credentials should be trusted
-
Option 1 AND Option 4
-
Option 2 AND Option 4
-
securitymanager
-
policytool
-
jarsigner
-
keystore
-
None of the above