Authorized DevOps and container security practice
Set the authorized scope and map the pipeline
Choose a controlled GitLab project, confirm the approved activities, and decide what evidence a useful pipeline should produce.
Learning objective
Record the exact repository, branch, image, runner, registry, and allowed actions before you change CI or container configuration.
Use only a repository, branch, runner, registry, image, and activity you own or have explicit authorization to review. Use a Gemini tool only with sanitized material your organization approves. The website does not connect to Gemini.
Confirm permission before opening a pipeline
Use a repository and image that you own, or that the owner has explicitly authorized you to review. Confirm the named project, working branch, runner, registry, allowed job types, data-handling rules, and any limits on builds or image pushes. A repository being visible in GitLab does not authorize a security review or a pipeline change.
For these exercises, use a small training project or an approved fork with synthetic source files. Do not target a production repository, publish an image, change a protected branch, or run a scan against an unrelated registry unless that exact activity is approved. Stop and ask the asset owner when the scope is unclear or a pipeline reaches an unapproved target.
Define the evidence before adding jobs
List the commands the authorized project already uses to lint, test, and build. Decide which job must finish before the next stage, which files should be retained as artifacts, and who reviews a failing result. The pipeline should make the expected outcome visible in job logs, the pipeline graph, and a named artifact when one is useful.
Keep the first pass small. A verification stage can run lint and tests; a later build stage should run only after verification succeeds. Add container build and security scan jobs only when the project has an approved runner and registry workflow. A green pipeline describes the checks that ran; it does not prove that the application or image has no security risks.
Controlled practice
Apply the lesson
Training scenario
You have an approved training fork of a small Node service. The owner permits changes on a feature branch, pipeline validation, and use of a disposable project registry. Production deployment and testing other repositories are outside scope.
- Write down the authorized project and feature branch, then confirm the allowed runner and registry.
- Read the package scripts and identify the existing lint, test, and build commands.
- Sketch the job order and the success evidence you expect before opening the pipeline editor.
- Mark deployment, protected branches, and unrelated images as out of scope for this exercise.
Check your work: Your plan names the exact approved project and branch, keeps each activity inside that boundary, and defines observable lint, test, build, and artifact outcomes.
Learning check
Check your understanding
A public GitLab project contains a Docker image that looks useful for practice. What should you do before scanning it?
Continue in the lesson sequence. Return to the GitLab and Gemini path.