Free 312-96 sample questions
Here are free 312-96 sample questions on secure Java coding, with answers and explanations. They test threat modeling, input checks and session security. Use them to find weak spots in how you write and review code.
Try them in the simulator Same questions, with study, timed and flashcard modes.
Showing 10 of 20 free sample questions.
A security architect is reviewing the design of a new Java application and wants to apply the STRIDE threat modeling methodology. The architect is concerned about a feature where users can upload and modify their own profile data. Which STRIDE category best describes the threat of a user modifying another user's profile data by guessing their user ID?
A developer is using the Java `SecureRandom` class to generate a key for an AES encryption algorithm. Which of the following code snippets represents the most secure way to initialize `SecureRandom` on a Linux system?
A team is building a high-security Java application that requires Role-Based Access Control (RBAC). The system must support a hierarchy of roles (e.g., an 'Administrator' role inherits all permissions of a 'Manager' role, which inherits from a 'User' role). The security engineer needs to implement checks to ensure a user has the required permission before performing an action. Which framework or technology provides the most comprehensive, out-of-the-box support for this type of hierarchical permission model?
**Case Study** HealthTrack, a healthcare technology company, is developing a patient portal application using Java and the Spring Framework. During the requirements gathering phase, the security team identified that the application must be compliant with the Health Insurance Portability and Accountability Act (HIPAA). **Application Components:** - A front-end built with a modern JavaScript framework. - A back-end REST API built with Spring Boot. - A PostgreSQL database for storing patient data, including electronic Protected Health Information (ePHI). - The application is deployed on a public cloud provider. **Security Requirements:** 1. All ePHI must be encrypted both at rest and in transit. 2. Access to ePHI must be strictly controlled and logged. 3. The application must be protected against common web vulnerabilities (OWASP Top 10). 4. User sessions must automatically time out after 15 minutes of inactivity. Which of the following solution proposals best addresses the HIPAA compliance requirements for session management and data encryption?
A security engineer is configuring a Content Security Policy (CSP) for a Java web application to mitigate XSS attacks. The application needs to load scripts from its own domain and from `https://apis.google.com`. Which is the correct CSP directive to achieve this?
A developer is writing a Java servlet that handles sensitive user data. To prevent Cross-Site Request Forgery (CSRF), they decide to implement the synchronizer token pattern. Which of the following are essential steps in a correct implementation of this pattern? (Select TWO)
A DAST tool reports a possible XML External Entity (XXE) injection vulnerability in a Java application that parses XML documents. The vulnerable code uses `javax.xml.parsers.DocumentBuilderFactory`. What is the most effective way to configure the `DocumentBuilderFactory` to prevent XXE attacks?
A company's security policy mandates that all third-party libraries used in their Java projects must be scanned for known vulnerabilities. This process needs to be automated and integrated into their Maven build lifecycle. Which tool is most suitable for this purpose?
Which Java security principle dictates that a module of code should only have access to the information and resources that are necessary for its legitimate purpose? graph TD subgraph UserSpace[User Space] App[Application Code] Lib[Library Code] end subgraph KernelSpace[Kernel Space] FS[File System] Net[Network Stack] Mem[Memory Manager] end App -- Limited Access --> Lib Lib -- System Calls --> FS Lib -- System Calls --> Net style App fill:#f9f,stroke:#333,stroke-width:2px style Lib fill:#ccf,stroke:#333,stroke-width:2px
10 more free samples are waiting
Create a free account to unlock the whole 312-96 sample bank, or get full access to all 244 practice questions in the simulator.