Question
What YAML syntax do you use to exclude certain files from secret scanning?
- A. paths-ignore: Correct
- B. secret_scanning.yml
- C. branches-ignore:
- D. decrypt_secret.sh
Explanation
To exclude files from secret scanning, you create a .github/secret_scanning.yml file and list the paths under the paths-ignore key, using special characters such as * to filter them. secret_scanning.yml is the name of the file that holds the setting, not the syntax used inside it. branches-ignore filters branches for workflow triggers and does not exclude files from secret scanning, and decrypt_secret.sh is a shell script rather than YAML syntax.