wayground logo

Free Printable Worksheets

NEW

Font size

S
M
L
XL
Worksheets

Module 3: Secrets Management & Code Scanning

Total questions: 20

Worksheet time: 7mins

Name
Class
Date
1.

Why must secrets such as API keys and tokens never be stored directly in source code?

a)

They increase repository size

b)

They slow down application performance

c)

They grant direct access that attackers can exploit if exposed

d)

They prevent collaboration between developers

2.

Which of the following is a key security risk associated with hardcoded credentials?

a)

Slower CI/CD pipelines

b)

Difficulty rotating compromised credentials

c)

Reduced code readability

d)

Increased merge conflicts

3.

What is a major danger of secrets leaked through commit history?

a)

Loss of code ownership

b)

Attackers can retrieve previously exposed credentials

c)

Repository size increases

d)

Reduced automation efficiency

4.

How does GitHub Secrets protect sensitive values?

a)

By storing them in plain text with access restrictions

b)

By hiding them in comments

c)

By encrypting them and preventing exposure in logs or code

d)

By storing them only in local developer machines

5.

Which capability is provided by GitHub Secrets?

a)

Automatic secret rotation

b)

Centralized encrypted storage for sensitive values

c)

Public sharing of secrets

d)

Manual injection into source files

6.

Where do you navigate to manage GitHub Actions secrets for a repository?

a)

Code > Settings > Security

b)

Settings > Actions > Workflows

c)

Security > Secrets and variables > Actions

d)

Insights > Security

7.

Who can create or update repository secrets?

a)

Any contributor

b)

Only workflow authors

c)

Only users with appropriate permissions

d)

Anyone with read access

8.

Which practice aligns with recommended secret management best practices?

a)

Sharing secrets across all projects

b)

Hardcoding secrets for easier access

c)

Rotating secrets regularly

d)

Storing secrets in documentation

9.

What principle ensures contributors only have the minimum access required to secrets?

a)

Centralized access

b)

Least-privilege permissions

c)

Open collaboration

d)

Default access

10.

Why should secrets be restricted to specific environments?

a)

To simplify repository configuration

b)

To ensure secrets are only used in controlled contexts

c)

To reduce build times

d)

To improve documentation clarity

11.

Why is code scanning essential for secure development?

a)

It replaces testing completely

b)

It detects vulnerabilities and insecure patterns early

c)

It eliminates the need for developers

d)

It guarantees vulnerability-free code

12.

Which is a core capability of GitHub Advanced Security?

a)

Manual vulnerability reporting

b)

Automated code scanning for security vulnerabilities

c)

Performance optimization

d)

UI testing

13.

What advantage do built-in GitHub scanning tools offer compared to open-source scanners?

a)

More customization

b)

Slower setup

c)

Faster setup and tighter integration

d)

No maintenance required

14.

Where can you enable code scanning for a repository?

a)

Actions tab

b)

Pull Requests tab

c)

Security tab

d)

Insights tab

15.

What happens when CodeQL is enabled?

a)

Scans run only manually

b)

Analysis starts automatically on pushes and pull requests

c)

Only quality issues are detected

d)

Results are hidden from developers

16.

Why is automating code scanning important?

a)

It reduces developer accountability

b)

It ensures scans run consistently without manual effort

c)

It slows down development intentionally

d)

It replaces security teams

17.

How are automated scanning results integrated into workflows?

a)

Delivered via external dashboards only

b)

Linked directly to affected code in pull requests

c)

Sent as weekly emails

d)

Stored only in logs

18.

What is a recommended approach to balancing scan results and productivity?

a)

Fix all findings immediately

b)

Ignore low-impact findings permanently

c)

Prioritize high and critical severity issues

d)

Disable scanning frequently

19.

What information is typically included in a code scanning finding?

a)

Developer name only

b)

Severity, affected files, and remediation guidance

c)

Build duration

d)

Commit history

20.

Why integrate code scanning into pull request reviews?

a)

To delay merges

b)

To shift security left and prevent unsafe code from merging

c)

To replace peer review

d)

To reduce CI costs