
App Security and npm Quiz
Authored by Zh L
Computers
University
Used 2+ times

AI Actions
Add similar questions
Adjust reading levels
Convert to real-world scenario
Translate activity
More...
Content View
Student View
13 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which package is used to hash passwords and other sensitive information before sending them to the database to protect against breaches?
dotenv
bcrypt
jsonwebtoken
mongoose
Answer explanation
bcrypt is used to hash passwords and other sensitive information before storing them in a database. Hashing is a security measure that converts sensitive data into a fixed-length string of characters, making it difficult for attackers to decipher the original data. This helps protect against breaches by ensuring that even if the database is compromised, the original passwords and sensitive information remain secure.
2.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the purpose of the jsonwebtoken package in app security?
To manage environmental variables and sensitive information.
To hash passwords and sensitive information.
To provide a means of representing claims transferred between two parties securely.
To build APIs and server-side applications with Node.js.
Answer explanation
jsonwebtoken is used to create and verify JSON Web Tokens (JWTs), which are a means of representing claims between two parties securely.
JWTs are commonly used for authentication and information exchange in web development.
The package allows developers to create tokens containing information (claims) that can be verified by the receiving party to ensure their authenticity and integrity.
This helps enhance app security by enabling secure communication and verification of user identity.
3.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What npm command is used to initialize a new or existing npm package in a directory?
npm install
npm start
npm init
npm run
4.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the purpose of authorization in app security?
To track user activity within the application.
To determine user permissions within the application.
To verify user or system identity for application access.
To encrypt data at rest.
Answer explanation
Authorization in app security controls what users can do in the application. It decides which parts of the app a user can access based on their identity and role. This prevents unauthorized access to sensitive data and features, ensuring that users only have access to what they're supposed to.
5.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the purpose of authentication in app security?
To track user activity within the application.
To determine user permissions within the application.
To verify user identity when accessing an application.
To manage user accounts and system settings.
Answer explanation
Authentication in app security is like proving you are who you say you are. It's the process of verifying your identity, typically by entering a username and password, to access an app. This helps ensure that only the right people can get into the app and keeps out unauthorized users.
6.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
Which of the following is NOT a responsibility of administration in app security?
User account creation, modification, and deletion.
Role assignment (e.g., user, admin).
Configuring security policies.
Tracking user activity within the application.
7.
MULTIPLE CHOICE QUESTION
20 sec • 1 pt
What is the purpose of using dotenv in app security?
To manage environmental variables and sensitive information.
To hash passwords and sensitive information.
To handle authentication and authorization.
To encrypt sensitive data at rest.
Answer explanation
dotenv helps keep sensitive information, like passwords or API keys, safe by storing them in a separate file. It loads these details into the app securely, so they're not exposed in the code.
Access all questions and much more by creating a free account
Create resources
Host any resource
Get auto-graded reports

Continue with Google

Continue with Email

Continue with Classlink

Continue with Clever
or continue with

Microsoft
%20(1).png)
Apple
Others
Already have an account?