
~/roadmaps/السحابة و devsecops
Infrastructure as Code Security
Terraform/CloudFormation misconfig hunting.
جارٍ تحميل الخريطة…
Infrastructure as Code Security Roadmap: خطوة بخطوة
عدد الخطوات بالترتيب: 15. افتح أي خطوة في الخريطة أعلاه لتتبّع تقدّمك وتدوين ملاحظاتك.
Orientation
1.Start here
Start· مبتدئ· ~0.5h
Infrastructure as code (IaC) defines servers, networks and cloud resources in files. This roadmap teaches you to write, review and scan IaC so infrastructure is secure by default. Terraform basics and a cloud practice account help.
- Install Terraform
- Have a cloud practice account
- Plan your study time
Core skills
2.IaC landscape
Concept· متوسط· ~2h
Tools such as Terraform, CloudFormation, Bicep and Pulumi describe infrastructure as code, making it reviewable, repeatable and scannable.
- Compare common IaC tools
- Understand declarative vs imperative approaches
- Know why IaC improves security
الأدوات والتقنيات: IaC
3.Terraform fundamentals
Concept· متوسط· ~3h
Terraform uses providers, resources, variables and state to create and update infrastructure.
- Write resources and variables
- Use init, plan and apply
- Understand state
الأدوات والتقنيات: IaC
4.State security
Concept· متوسط· ~4h
Terraform state can contain secrets and resource details. It must be stored remotely, encrypted and access-controlled.
- Use a remote, encrypted backend
- Restrict access to state
- Avoid secrets in state where possible
الأدوات والتقنيات: IaC
5.Module design
Tool· متوسط· ~2h
Modules package reusable infrastructure. Secure modules bake in good defaults so every team gets them automatically.
- Build reusable modules
- Set secure default values
- Version modules
الأدوات والتقنيات: IaC
6.Common misconfigs
Lab· متوسط· ~3h
Common IaC mistakes include public storage, open security groups, missing encryption and wildcard permissions — all detectable before deployment.
- Recognize common misconfigurations in code
- Scan with a tool such as Checkov
- Fix findings at the source
الأدوات والتقنيات: IaC
7.Policy as code tools
Concept· متوسط· ~4h
Policy-as-code tools such as OPA or Sentinel enforce organization rules on IaC plans automatically.
- Write simple policies
- Evaluate Terraform plans against them
- Integrate policies into CI
الأدوات والتقنيات: IaC
Advanced practice
8.Drift detection
Concept· متوسط· ~2h
Drift happens when someone changes infrastructure outside of code. Detecting it keeps the code the source of truth.
- Detect drift with terraform plan
- Decide whether to revert or codify changes
- Limit console changes
الأدوات والتقنيات: IaC
9.Keeping secrets out of IaC
Tool· متوسط· ~3h
Passwords and keys must never be hard-coded in IaC files. Use secret managers, sensitive variables and generated credentials.
- Mark variables as sensitive
- Load secrets from a secret manager
- Scan repositories for leaked secrets
الأدوات والتقنيات: IaC
10.Multi-account patterns
Concept· متوسط· ~4h
Separate accounts or projects for production, development and security limit blast radius. IaC manages them consistently.
- Design a multi-account structure
- Deploy baselines to every account with IaC
- Centralize logging and security
الأدوات والتقنيات: IaC
11.Review workflows
Lab· متوسط· ~2h
Every infrastructure change should be reviewed as a pull request with the plan output attached.
- Review plans, not just code
- Require approvals for production
- Automate plan comments in pull requests
الأدوات والتقنيات: IaC
12.Fixing IaC findings at scale
Concept· متوسط· ~3h
Fix findings in modules and templates so every consumer benefits, rather than patching each deployment by hand.
- Prioritize fixes in shared modules
- Track exceptions with reasons
- Prevent reintroduction with CI checks
الأدوات والتقنيات: IaC
13.Lab: secure a module
Tool· متوسط· ~4h
Put it all together by building and securing a real module: secure defaults, policies, scanning and review.
- Build a module with secure defaults
- Enforce policies and scans in CI
- Document usage
الأدوات والتقنيات: IaC
Assessment
14.Skills checkpoint
Checkpoint· متوسط· ~2h
Check that you can write, scan, review and enforce secure infrastructure as code.
- Protect state and secrets
- Scan and enforce policies in CI
- Detect and handle drift
Capstone
15.Infrastructure as Code Security — ready
Finish· متوسط· ~1h
You can now secure infrastructure as code. Continue with the DevSecOps Pipeline, AWS/Azure/GCP Security or Kubernetes Security roadmaps.
- Keep your modules maintained
- Choose your next roadmap
- Share a secure module