nerdexam
Microsoft

GH-500 · Question #94

What YAML syntax do you use to exclude certain files from secret scanning?

The correct answer is A. paths-ignore. To exclude specific files or paths from secret scanning, you create a '.github/secret_scanning.yml' configuration file and use the 'paths-ignore:' key followed by glob patterns. For example, 'paths-ignore: ["docs/**"]' would tell secret scanning to skip all files under the docs…

Configure and use secret scanning

Question

What YAML syntax do you use to exclude certain files from secret scanning?

Options

  • Apaths-ignore:
  • Bsecret_scanning.yml
  • Cbranches-ignore:
  • Ddecrypt_secret.sh

How the community answered

(30 responses)
  • A
    90% (27)
  • B
    3% (1)
  • D
    7% (2)

Explanation

To exclude specific files or paths from secret scanning, you create a '.github/secret_scanning.yml' configuration file and use the 'paths-ignore:' key followed by glob patterns. For example, 'paths-ignore: ["docs/**"]' would tell secret scanning to skip all files under the docs directory. Option B ('secret_scanning.yml') names the configuration file itself - it is not a YAML syntax key. Option C ('branches-ignore:') is a workflow trigger filter for excluding branches in GitHub Actions event triggers, unrelated to secret scanning scope. Option D ('decrypt_secret.sh') is a filename sometimes used in tutorials to demonstrate decrypting encrypted secrets in workflows - it is not a YAML syntax key for secret scanning configuration.

Topics

#Secret Scanning#Configuration#YAML Syntax#Exclusion Paths

Community Discussion

No community discussion yet for this question.

Full GH-500 Practice