Your DevOps study space

Real explanations. Videos with tests. Fresh exams every time. Keep the streak alive and watch the XP stack up.

Security in the pipeline (DevSecOps) · DevOps Docs · StackwisePlanDevOps Security in the pipeline (DevSecOps) · DevOps Docs · StackwiseCodePython Security in the pipeline (DevSecOps) · DevOps Docs · StackwiseBuildDocker Security in the pipeline (DevSecOps) · DevOps Docs · StackwiseTestDevOps Security in the pipeline (DevSecOps) · DevOps Docs · StackwiseReleaseGit Security in the pipeline (DevSecOps) · DevOps Docs · StackwiseDeployKubernetes Security in the pipeline (DevSecOps) · DevOps Docs · StackwiseOperateLinux Security in the pipeline (DevSecOps) · DevOps Docs · StackwiseMonitorDevOps

Pick a topic

Eight tracks, each with docs, a cheat sheet, videos and tests.

How it works

One loop, repeated until it sticks.

Jump back in

Picked up from where you left off.

Free forever

Your DevOps journey starts with one click.

Sign in with Google or GitHub to open every chapter, video, test and challenge. Your progress is saved wherever you learn.

Security in the pipeline (DevSecOps)

DevSecOps means security checks run inside the same pipeline as your tests, on every change, instead of a security review weeks after release. Each check is small and automatic. Together they catch leaked passwords, vulnerable libraries, risky infrastructure and over-powered CI jobs before any of it reaches production.

Shift left: catch it where it's cheap

A leaked key caught on your laptop costs a minute. The same key found in production logs costs a rotation, an investigation and maybe a breach notice. "Shift left" means moving each check as early (as far left in the pipeline) as it can go:

  • On your machine: a pre-commit hook that refuses to commit secrets.
  • On every push and pull request: dependency, code and config scans in CI.
  • On every image: a vulnerability scan before it's pushed (Docker chapter 6).
  • In production: patching, least privilege and monitoring (DevOps chapter 7).
commityour laptopgitleakspull requestCIdeps, SAST, IaCimageCItrivy imageproductionrunningpatch, monitorthe earlier a problem is caught, the cheaper it is to fixa leaked key: one minute on a laptop, a rotation and an incident in production
Each check is small and automatic, and sits as early as it can. Most problems never get past the pull request.

Secrets never go in Git

Anything committed stays in the history, even after you delete it in the next commit, and anyone who clones the repo gets it. Bots scan public GitHub for keys within minutes. So:

  • Keep secrets in .env files that are in .gitignore, and commit a .env.example with the names but no values.
  • In CI, use the platform's secret store (GitHub Actions secrets, GitLab CI variables), never a value in the workflow file.
  • Run a scanner before each commit. gitleaks knows hundreds of token formats; with the pre-commit framework it runs automatically:
    # .pre-commit-config.yaml
    repos:
      - repo: https://github.com/gitleaks/gitleaks
        rev: v8.21.2          # pin a release
        hooks:
          - id: gitleaks
    
    $ pip install pre-commit
    $ pre-commit install            # from now on, every git commit is checked
  • Turn on GitHub's secret scanning with push protection (Settings, then Code security). It blocks pushes that contain known token formats.
Leaked a secret anyway? Rotate it first: revoke the key and make a new one. Cleaning it out of the Git history comes second, because by the time you notice, someone may already have a copy.

Dependencies: most of your code isn't yours

A typical app pulls in hundreds of packages, and vulnerabilities are found in them every week. Check them on every build, and let a bot open pull requests for updates:

$ pip-audit                     # Python: checks installed packages against known vulnerabilities
$ npm audit --audit-level=high  # Node: exits non-zero on high or critical issues

# .github/dependabot.yml: weekly update PRs for packages, base images and actions
version: 2
updates:
  - package-ecosystem: "pip"
    directory: "/"
    schedule: { interval: "weekly" }
  - package-ecosystem: "docker"
    directory: "/"
    schedule: { interval: "weekly" }
  - package-ecosystem: "github-actions"
    directory: "/"
    schedule: { interval: "weekly" }

Small, frequent updates are easy to review and test. A year of skipped updates turns into one scary upgrade nobody wants to do.

Your own code: static analysis

SAST (static application security testing) reads source code for risky patterns: SQL built by string concatenation, user input passed to a shell, disabled TLS checks. CodeQL is free for public repositories on GitHub (Security tab, then Code scanning; the "default setup" needs no YAML at all). Semgrep is another popular choice. Expect some false alarms; review each finding, fix or dismiss it with a reason.

Infrastructure as code: scan the config too

A Terraform file can open SSH to the whole internet or make a bucket public without a single line of app code changing. Config scanners catch that before apply:

$ trivy config .                 # Terraform, Kubernetes YAML, Dockerfiles, Helm charts
main.tf:12
HIGH: Security group rule allows ingress from public internet (0.0.0.0/0) to port 22

Checkov does the same job. Run it in the pull request, next to terraform plan, so the reviewer sees both.

Least privilege for the pipeline itself

CI holds the keys to production, so it's a favourite target. Four habits shrink the damage if a job is ever compromised:

  • Give the workflow token only what it needs. Put permissions: contents: read at the top of every workflow and add more (like packages: write) only to the job that needs it.
  • Pin third-party actions to a commit SHA, not a tag: uses: some/action@8f4b7f8.... Tags can be moved. In March 2025 the tags of a widely used action, tj-actions/changed-files, were pointed at malicious code that printed CI secrets into build logs; workflows pinned to a SHA weren't affected. Dependabot can keep pinned SHAs up to date.
  • Use OIDC instead of stored cloud keys. With permissions: id-token: write, the job gets a short-lived token from GitHub, swaps it for temporary AWS credentials, and nothing long-lived is stored anywhere. The IAM role's trust policy decides which repository and branch may use it.
  • Protect deploys with environments. A GitHub environment called production with required reviewers makes a person approve before any job using its secrets can run.
CI jobid-token: writeGitHub OIDCsigned: repo + branchAWS STSchecks the role trustAWSshort-lived keys1 ask2 token3 swap it4 deployno stored keys anywhere
Nothing long-lived to leak. The IAM role's trust policy decides which repository and branch may assume it, and the credentials expire on their own.

Putting it together

name: checks
on: [push, pull_request]
permissions:
  contents: read

jobs:
  security:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
        with: { fetch-depth: 0 }            # full history, so gitleaks sees every commit
      - name: Secrets
        uses: gitleaks/gitleaks-action@v2
        env: { GITHUB_TOKEN: "${{ secrets.GITHUB_TOKEN }}" }   # repos owned by an organisation also need a free GITLEAKS_LICENSE
      - name: Dependencies
        run: pip install pip-audit && pip-audit -r requirements.txt
      - name: Terraform and Kubernetes config
        run: |
          curl -sfL https://raw.githubusercontent.com/aquasecurity/trivy/main/contrib/install.sh | sh -s -- -b /usr/local/bin
          trivy config --severity HIGH,CRITICAL --exit-code 1 .
      - name: Image
        run: |
          docker build -t app:${{ github.sha }} .
          trivy image --severity HIGH,CRITICAL --ignore-unfixed --exit-code 1 app:${{ github.sha }}

Make the security job a required check on the main branch (branch protection), and a pull request can't merge until it's green.

Common mistakes

  • Scanning but never failing the build. A report nobody reads changes nothing. Fail on what you can act on (high severity, fix available) and track the rest.
  • Failing on everything on day one. The team learns to ignore red builds. Start strict on new findings only, then work through the old ones.
  • Secrets in logs. echo $TOKEN or set -x in a CI script prints them. GitHub masks secrets it knows about, but not values derived from them.
  • One admin key for everything. Separate credentials per environment and per job, each with the narrowest permissions that work.
  • Forgetting the runtime. A clean scan at build time doesn't stay clean. Rebuild and redeploy regularly so base images pick up fixes.

Questions

Pick an answer. Get it wrong and you can try again right away, no waiting. 10 questions per topic - pick a filter below, then use Recreate questions for a fresh set on that topic.

Fresh questions every time

Exam

A mixed test across the whole site, shuffled so you never know which topic comes next. When you submit, every mistake comes with the reason and a jump to the exact moment in the video that explains it.

30 questions 6 topics 20 minute limit Up to 70 XP
1–4 answer · ←→ move
History

Essay

0 / 200-250 words
Sample answer
History
0:00 / 0:00
Not started

on YouTube
Subscribe

Topic progress

Activity

Achievements

Settings

Your profile and your account.

Profile details

* Required. Saved in this browser until you sign in.

Letters, numbers, dots, dashes and underscores.
0 / 160

Account

Checking…

App

Install Stackwise on your phone or computer. It opens in its own window from your home screen, and the Docs and cheat sheets you've opened keep working without internet.

Only admins can see this

Dashboard

Sign-ups, activity, messages and reviews in one place.

Prove it

Certificates

Pass a topic's test and get a certificate with its own public page you can share or add to LinkedIn. Each test is 10 questions drawn at random and graded on the server; you need 8 right, you have 15 minutes, and you get one try per topic a day.

From first command to production

Linux for DevOps

A path through Linux the way DevOps engineers use it: ten stages, every command explained with its flags, examples, real output and mistakes, the combinations engineers chain together, and incidents worked through step by step. Practise everything in a safe lab folder.

Before the interview

Interview prep

Questions that come up in real DevOps interviews, with the kind of answer that lands. Say yours out loud first, then compare. Each one links to the chapter that goes deeper.

    Private to you

    My notes

    Everything you wrote down while watching and reading, in one place. Saved to your account, never shown to anyone.