
Web Security: Common Vulnerabilities And Their Mitigation - The nonce attribute and the script hash
Interactive Video
•
Information Technology (IT), Architecture
•
University
•
Practice Problem
•
Hard
Wayground Content
FREE Resource
Read more
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Why is it recommended to avoid using inline scripts on a secure website?
They can lead to cross-site scripting vulnerabilities.
They are not supported by all browsers.
They are difficult to maintain.
They increase the website's loading time.
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the nonce attribute in a script tag?
To uniquely identify and whitelist a specific inline script.
To provide a fallback for unsupported browsers.
To improve the script's performance.
To specify the script's execution order.
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How should a nonce be generated for each page response?
By using the same ID for all responses.
By using a secure random ID that changes with each response.
By using a timestamp.
By using a hardcoded value.
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is an alternative method to nonce for whitelisting inline scripts?
Using a script tag.
Using a script URL.
Using a script ID.
Using a script hash.
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What must be done if the JavaScript content of a script tag changes?
The script tag must be removed.
The nonce must be updated.
The hash must be regenerated.
Nothing, the hash remains the same.
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you obtain the hash for a script using Chrome developer tools?
By using a third-party tool.
By manually calculating the hash.
By running the script with the content security policy header set.
By inspecting the script tag in the HTML.
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of the report-only mode in content security policy?
To disable content security policy.
To report violations without enforcing restrictions.
To allow all scripts by default.
To enforce restrictions immediately.
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?