Tip: Choose Save as PDF in the print dialog to download. Use A4 paper size.
Shade in the A or B circle for each question.
Draw a line connecting each item on the left to its match on the right.
| Left column | Right column | |
|---|---|---|
| 1git push origin main (blocked by branch protection) | AA password is hard-coded in a committed file. It stays in the history even if deleted later, so secrets should be kept outside the repository and the exposed password changed. | |
| 2git log --format='%h %an %ad %s' | Balice: Read bob: Write carol: Admin | |
| 3Role-based permissions give each person only the repository access their job needs | CA public repository lets anyone on the internet read the source code. Internal software should be set to private so only approved people can access it. | |
| 4Keep secrets out of commits so they are not stored in the repository history | DShows an audit trail of changes: who made each commit, when, and what the change was | |
| 5Repository visibility: Public (internal payroll app) | EA protected main branch rejects direct pushes, so changes must go through a reviewed pull request | |
| 6git commit -m "add db" # DB_PASSWORD = "admin123" in config.py | Fecho ".env" >> .gitignore |
Complete each line of code by filling in the missing parts.
Shade in the letter of the line that contains an error.
repository security — Controlling who can read and change a code repository and protecting what is stored in it, e.g. private repos, roles, a protected main branch, no secrets in commits, audit logs.repo.visibility = "private"git log --author="sam" --onelinebranch: main
protected: true
reviews: 1repo.grant("intern", "read")echo ".env" >> .gitignore