nerdexam
CompTIA

CAS-005 · Question #143

A security analyst is reviewing the following code in the public repository for potential risk concerns: Which of the following should the security analyst recommend first to remediate the…

The correct answer is B. Revoking the secret used in the solution. The code includes a hard-coded secret (access_token), which is a security vulnerability. The first action should be to revoke this secret immediately to prevent unauthorized access, as it is exposed in the public repository. Once the secret is revoked, the secret management…

Submitted by klara.se· Mar 6, 2026Security Engineering

Question

A security analyst is reviewing the following code in the public repository for potential risk concerns:

Which of the following should the security analyst recommend first to remediate the vulnerability?

Exhibits

CAS-005 question #143 exhibit 1
CAS-005 question #143 exhibit 2

Options

  • ADeveloping role-based security awareness training
  • BRevoking the secret used in the solution
  • CPurging code from public view
  • DScanning the application with SAST

How the community answered

(52 responses)
  • A
    2% (1)
  • B
    83% (43)
  • C
    6% (3)
  • D
    10% (5)

Explanation

The code includes a hard-coded secret (access_token), which is a security vulnerability. The first action should be to revoke this secret immediately to prevent unauthorized access, as it is exposed in the public repository. Once the secret is revoked, the secret management process should be improved, such as by using environment variables or secure vault solutions.

Community Discussion

No community discussion yet for this question.

Full CAS-005 Practice