Timedora
Free Practice Quiz Question List

Injection Risks and Defenses Online Quiz Questions

Use this free practice quiz with 10 questions to review Injection Risks and Defenses, test your knowledge, and prepare for your next test or exam.

10 questions
01
Choose one
1 point

Which condition best describes an injection flaw?

  1. A

    The application rejects every input containing punctuation.

  2. B

    Untrusted input changes the meaning of instructions interpreted by a component.

  3. C

    An application stores user input for later retrieval.

  4. D

    A system records an unexpected event in a log.

02
Choose one
1 point

When distinguishing among injection risks, which question is most useful to ask first?

  1. A

    Whether the input came from a web form or an API.

  2. B

    Whether the application has a firewall.

  3. C

    Which interpreter receives the untrusted input.

  4. D

    Whether the input contains unusual characters.

03
Choose one
1 point

An application accepts input through an API, a file, and a cookie. What is the most appropriate first step in reviewing injection risk?

  1. A

    Trace untrusted data from any input channel to the interpreter that consumes it.

  2. B

    Review only values submitted through web forms.

  3. C

    Treat input from files and cookies as trusted by default.

  4. D

    Look for punctuation in user input without tracing where it goes.

04
Choose one
1 point

A product-search feature joins a supplied search term into SQL text, and the database may interpret part of the term as SQL syntax. Which interpreter boundary is at risk?

  1. A

    A browser interprets untrusted content as active HTML.

  2. B

    A directory service interprets a changed search filter.

  3. C

    An operating-system command processor interprets an argument as command syntax.

  4. D

    A database interprets untrusted input as part of SQL query syntax.

05
Choose one
1 point

A developer wants to prevent supplied search terms from changing the meaning of a database query. Which approach most directly preserves the data-versus-instructions boundary?

  1. A

    Block all requests that contain punctuation.

  2. B

    Use parameterized queries to separate query structure from data values.

  3. C

    Rely on input validation instead of parameterization.

  4. D

    Give the database account broad privileges so it can handle all queries.

06
Choose one
1 point

A database query needs a user-selected sort column. Which practice is appropriate for this structural choice?

  1. A

    Pass the requested table name as an ordinary query parameter.

  2. B

    Let a generic character filter decide which identifiers are safe.

  3. C

    Map dynamic identifiers or sort choices to a strict allowlist.

  4. D

    Assume parameterization makes every possible query component safe.

07
Choose one
1 point

An application must launch a process using externally influenced input. Which approach best reduces command-injection risk while addressing argument safety?

  1. A

    Prefer a built-in API; if a process is needed, invoke a fixed executable with separated and validated arguments.

  2. B

    Concatenate input into a shell command after removing a few characters.

  3. C

    Assume separated arguments prevent all unsafe options from reaching the program.

  4. D

    Run the application with extra privileges in case the process needs them.

08
Choose one
1 point

Untrusted content is placed into a page and interpreted as active script in a user's browser. Which risk does this describe?

  1. A

    A database interprets part of a search term as query syntax.

  2. B

    An operating system interprets an argument as a command.

  3. C

    A directory service interprets a filter as a changed search expression.

  4. D

    A browser interprets untrusted content as active HTML or script.

09
Choose one
1 point

Client-side code needs to display an untrusted string as ordinary text. Which option best preserves that intent?

  1. A

    Parse the untrusted string as HTML and rely on a firewall.

  2. B

    Use Content Security Policy as a replacement for safe data handling.

  3. C

    Assign ordinary text through textContent rather than parsing the string as HTML.

  4. D

    Remove selected punctuation and then insert the string as markup.

10
Choose one
1 point

An application builds a directory search filter from untrusted input, and the input changes the filter's logic. Which risk is this?

  1. A

    Untrusted content is interpreted as active markup in a browser.

  2. B

    Untrusted input changes the structure or logic of a directory expression.

  3. C

    A command-line argument triggers an unexpected child process.

  4. D

    A database query returns an unexpected result.