What is the recommended action when a secret is detected?

Prepare for the GitHub Advanced Security Certification Test. Practice with multiple choice questions, detailed explanations, and hints. Achieve success on your first attempt!

Multiple Choice

What is the recommended action when a secret is detected?

Explanation:
When a secret is detected, the immediate priority is to reduce risk by invalidating the exposed credential and preventing further misuse. The best action is to rotate or revoke the secret, remove it from the repository, and purge its history if it was committed, so the sensitive data isn’t recoverable from prior revisions. After that, implement proper secret management—use a centralized secret store or vault, inject secrets at runtime (not in code), and enforce rotation policies to prevent future exposures. Ignoring the secret, renaming the file, or moving it to a public repository would leave the credential exposed and create a serious security vulnerability.

When a secret is detected, the immediate priority is to reduce risk by invalidating the exposed credential and preventing further misuse. The best action is to rotate or revoke the secret, remove it from the repository, and purge its history if it was committed, so the sensitive data isn’t recoverable from prior revisions. After that, implement proper secret management—use a centralized secret store or vault, inject secrets at runtime (not in code), and enforce rotation policies to prevent future exposures. Ignoring the secret, renaming the file, or moving it to a public repository would leave the credential exposed and create a serious security vulnerability.

Subscribe

Get the latest from Passetra

You can unsubscribe at any time. Read our privacy policy