A fintech pipeline will merge any request that compiles. A developer just pushed a cloud API key in a config file. The key is still in the commit and has not been rotated. Which next step minimizes the risk?
Select an answer to reveal the explanation.
Short Explanation
The key is already on the table. You stop the merge, you take it out of the branch, and you change the lock. An image scan with no image, a quarterly wait, or a deploy of the same tree leaves the key alive.
Full Explanation
The hole in front of the team is a secret in a commit that has not merged to the protected branch and has not been rotated. The next step revokes the exposed key, replaces it with a scoped credential, blocks the merge, and removes the secret from the proposed change so the leak is dead. An image scan has no image yet. Waiting a quarter, or deploying the tree as it stands, keeps the live key in play. Revoke the exposed key and replace it with a scoped credential, block the merge, and remove the secret from the proposed change is the design that meets this requirement. Scan container images in a pipeline that has not built an image from this commit is the wrong fit because no image has been built and the key is already in the commit. Wait for the quarterly access review and leave the key in the repository is the wrong fit because a quarterly review leaves a live key in the repository for the rest of the quarter. Add a production deploy stage that ships the repository as it stands is the wrong fit because deploying the repository as it stands publishes the key that has not been rotated. Exam caveat: Rotation includes every place the old key was copied, not only the file in git. Review repository history, forks, clones and logs for remaining copies. A blocked merge with a still-valid key is half the step. Operational check: Push a lab file with a test key and confirm the merge fails, then confirm the cloud API rejects the old key.