Cloud Security Fundamentals: Controls, Tests and Checklist
Cloud security fundamentals with a real scanner test: shared responsibility, core controls, risk ranking and a 90-day plan.
- 26 min read
- 38 sections
- Published November 23, 2026
Cloud security is the set of practices and tools that protect data, applications and infrastructure that run on cloud services. It covers who can sign in, what each person and program may do, how data is encrypted, how systems are configured, what gets logged and how you recover when something goes wrong.
Most guides to cloud security list best practices without showing what a mistake looks like. This one adds a hands-on test. I wrote a small, deliberately insecure cloud configuration, scanned it with an open-source tool, fixed it and scanned it again, so you can see which mistakes a scanner catches, which it misses and how much work remains.
The statements about AWS, Azure and the UK's National Cyber Security Centre come from their own documentation, which I read on October 28, 2026. The scan results are real output from Checkov version 3.3.30. The risk scores and checklists are our own analysis, and any numbers in them are invented to show the math.
The short answer
Cloud providers secure the underlying infrastructure, and you secure what you put on it. For most teams, that means getting five things right: identity and access, data protection, configuration, logging and recovery. Many serious cloud incidents involve a customer-side mistake, such as an exposed storage bucket or a powerful account with a weak login. I did not find a source that gives the exact share, so treat this as a common pattern and not a statistic.
Start with the controls that block the most damage: multi-factor sign-in, least privilege, no public data stores, encryption, logging that someone reads and backups you have tested. Then automate checks so mistakes are caught before they reach production.
Services and defaults change often. Check your provider's current documentation before you rely on any setting described here.
What cloud security covers
Cloud security spans several layers. Each layer has its own risks and its own controls.
| Layer | What it includes | Typical risk |
|---|---|---|
| Identity | Users, roles, keys and sign-in | Stolen or over-powerful credentials |
| Network | Firewalls, subnets and exposure to the internet | Services reachable by anyone |
| Data | Storage, databases and backups | Unencrypted or public data |
| Compute | Virtual machines, containers and functions | Unpatched software |
| Configuration | Settings across every service | Insecure defaults and drift |
| Applications | Your own code and its dependencies | Flaws in code and libraries |
| Operations | Logging, alerting and response | Attacks nobody notices |
Cloud security is not one product. It is a collection of habits and controls, spread across every service you use. That is why a clear picture of who is responsible for what comes first.
The cloud service models
How much you must secure depends on the kind of service you use. Microsoft's documentation describes the three common models and who manages what.
| Model | What you manage | What the provider manages |
|---|---|---|
| Infrastructure as a service | Virtual machines, operating systems and applications | Physical hosts, network and datacenter |
| Platform as a service | Your application and its data, without managing virtual machines or operating systems | The platform, operating system and below |
| Software as a service | Your data, users and settings | The application and everything beneath it |
The further toward software as a service you go, the less you manage and the less control you have. Even so, some duties never move to the provider, as the next section shows.
Shared responsibility
Major providers each publish a shared responsibility model. AWS splits duties into protection of the cloud itself and protection of what customers place in it. Its own side covers the infrastructure behind its services: the hardware, software, networking and facilities. The customer's side varies with the services the customer picks.
Microsoft's documentation adds that regardless of the type of deployment, you always keep certain responsibilities. It lists your data, including its classification, protection, encryption decisions and compliance with governance requirements, and the endpoints that access your cloud services, such as laptops and mobile devices. Identity and access are also yours to manage.
What this means in practice
If a bucket of customer files is public, that is almost always a customer configuration choice. If a physical server in a datacenter fails, that is the provider's problem. Between those lie many gray areas, such as patching a virtual machine, which is yours in an infrastructure service and the provider's in a software service.
Write down, for each service you use, who handles patching, backups, encryption keys, logging and access control. Gaps in that list are where incidents come from.
The NCSC's 14 cloud security principles
The UK's National Cyber Security Centre publishes 14 cloud security principles. They are designed for choosing and assessing cloud services, and they make a useful checklist for any organization. This table lists them with a short plain-language reading of each, which is my own summary.
| Principle | What it asks |
|---|---|
| 1. Data in transit protection | Is data protected while it moves across networks? |
| 2. Asset protection and resilience | Is data protected and recoverable where it is stored? |
| 3. Separation between customers | Can one customer affect or see another? |
| 4. Governance framework | Does the provider manage security with clear roles and processes? |
| 5. Operational security | Does the provider manage vulnerabilities, changes and incidents well? |
| 6. Personnel security | Are staff screened and their access limited? |
| 7. Secure development | Is the service built and tested securely? |
| 8. Supply chain security | Are the provider's own suppliers managed? |
| 9. Secure user management | Can you control and see who uses the service? |
| 10. Identity and authentication | Is access limited to authorized users? |
| 11. External interface protection | Are exposed interfaces protected? |
| 12. Secure service administration | Are administration methods secure? |
| 13. Audit information and alerting for customers | Can you get the logs and alerts you need? |
| 14. Secure use of the service | Do you use the service securely? |
The last principle is the one that falls on you. Even a very secure service can be used insecurely. Our multi-tenant SaaS guide shows how separation between customers can fail in practice, and the tests I ran on a database.
The core controls
These are the controls that matter most. This table is our analysis, with the typical failure for each.
| Control area | What to do | Typical failure |
|---|---|---|
| Identity and access | Use multi-factor sign-in, give each person and program only the access it needs, and review it | Shared accounts, administrator rights for everyone |
| Data protection | Encrypt data at rest and in transit, and manage keys carefully | Unencrypted stores, keys in code |
| Configuration | Define settings as code, and scan them before deployment | Manual changes and configuration drift |
| Network exposure | Keep management interfaces and databases off the public internet | Open administrative ports |
| Logging and monitoring | Record who did what, send logs to a protected place and review alerts | Logs turned off or never read |
| Patching | Update systems and track known exploited flaws | Old software on exposed servers |
| Backup and recovery | Keep copies in a separate account, and test restores | Backups never tested, or deletable by an intruder |
| Secrets management | Store keys and passwords in a vault, and rotate them | Passwords in code and chat |
Our guide to MFA methods ranks second factors from weakest to strongest. Central sign-in is covered by our single sign-on guide, and our privileged access management guide explains how to limit the most powerful accounts.
Identity is the new perimeter
In the cloud, anyone who can sign in with the right credentials can reach your resources from anywhere. That makes identity the main line of defense. Attackers know this, and they target logins, access keys and the tokens that programs use.
Give every human a personal account with multi-factor authentication. Give every program its own identity with limited permissions, and avoid long-lived keys. Remove access when people change roles or leave. Review administrator accounts often.
Least privilege in practice
Least privilege means granting only the permissions needed for the job. It is easy to say and hard to do, because broad permissions are quicker to set up. A wildcard policy that allows every action on every resource is the opposite, and the test below shows how many problems it triggers.
A hands-on test with a scanner
To see what misconfigurations look like and what scanners catch, I wrote a small Terraform file that describes six cloud resources on AWS. I made it insecure on purpose. Then I scanned it with Checkov, an open-source tool that checks infrastructure code against a library of rules.
The insecure file defined these resources.
| Resource | What I did wrong |
|---|---|
| Storage bucket with a public-read access control list | Made customer data readable by anyone |
| Security group that allows SSH from anywhere | Exposed an administration port to the internet |
| Database instance that is publicly accessible and unencrypted | Exposed a data store and left it unprotected at rest |
| IAM policy allowing every action on every resource | Gave a wildcard permission |
| Storage volume that is unencrypted | Left data unprotected at rest |
| A hard-coded database password | Put a secret in the code |
Checkov's Terraform checks ran 48 checks across the six resources. 15 passed and 33 failed.
| Resource | Failed checks |
|---|---|
| Database instance | 11 |
| IAM policy | 9 |
| Storage bucket | 8 |
| Security group | 3 |
| Storage volume | 2 |
The most serious failures were easy to read. The scanner reported that the bucket had an access control list allowing public read access, that a security group allowed ingress from anywhere to port 22, that the database was publicly accessible and not encrypted at rest, that the volume was not encrypted and that the policy allowed wildcard actions and administrative privileges.
Many of the 33 failures were less urgent. They asked for things like access logging, event notifications, lifecycle rules, cross-region replication, performance insights and enhanced monitoring. Those are good practices that depend on your needs, and they add noise.
What the scanner missed
The Terraform checks did not report the hard-coded password. None of the 33 failures was about the password. Checkov has a separate secrets mode, and when I ran that, it flagged the line with the password. The lesson is that no single tool covers everything. Run secrets scanning as well as configuration scanning.
Fixing it
I then wrote a hardened version. It added a key for encryption with rotation, a public access block and encryption on the bucket, versioning, a security group restricted to one office network range, shown with a documentation-only placeholder address that must be replaced, a private and encrypted database with backups, deletion protection and managed credentials, a narrow policy with two actions on one bucket, and an encrypted volume.
I wrote this file for static scanning only. I did not deploy it, and it is not a complete or ready-to-deploy account design. The office address in the security group is a documentation-only placeholder range that you must replace with your own trusted range. The file also omits items that a real deployment needs, such as a database subnet group, a key policy that fits your roles and a destination for logs. Passing a scan shows that selected rules are met, and it does not show that an account is secure.
| Scan | Checks run | Passed | Failed |
|---|---|---|---|
| Insecure version | 48 | 15 | 33 |
| Hardened version | 54 | 43 | 11 |
The hardened version still failed 11 checks. I judged each of them to be a hygiene or resilience item that depends on your needs, though you should review every one for your own case. The items included access logging on the bucket, replication, lifecycle rules, query logging, performance insights, enhanced monitoring and a key policy. A scanner will keep finding things, and a score of zero failures is not the goal. The goal is to remove the serious problems first and to decide, on purpose, which remaining items you accept.
How to use a scanner well
Run it in the pipeline
Scan every change before it merges, so mistakes never reach production. Our GitHub vs GitLab comparison covers the pipelines where this runs.
Rank findings by severity
Fix public exposure, wildcard permissions and missing encryption first.
Suppress with a reason
If you accept a finding, record why, and review it later.
Scan the running cloud too
Code can drift from reality when people change settings by hand.
Add secrets scanning
It catches what configuration checks miss.
Do not trust a green result blindly
A scanner only checks what its rules cover.
The Terraform files and the commands to run the scan are in the reproduce section at the end.
Ranking what to fix first
Real environments produce hundreds of findings. You need a way to rank them. A simple method scores each finding on three questions: how exposed is it, how sensitive is the data and how much power does it give an attacker.
I used a scale of 0 to 3 for each, and multiplied the scores after adding 1 to each, so a zero does not erase the others. The maximum is 4 times 4 times 4, which is 64. The scales and the method are my own, and the values are judgments.
| Finding from my test | Exposure | Data sensitivity | Privilege | Score |
|---|---|---|---|---|
| Hard-coded database password | 2 | 3 | 2 | 36 |
| Public customer data bucket | 3 | 3 | 1 | 32 |
| Public unencrypted database | 3 | 3 | 1 | 32 |
| SSH open to the internet | 3 | 1 | 2 | 24 |
| Wildcard IAM policy | 1 | 2 | 3 | 24 |
| Unencrypted volume | 0 | 2 | 0 | 3 |
| No access logging | 0 | 1 | 0 | 2 |
The ranking puts the password and the public data stores first, and logging last. That is the right shape: close the doors first, then improve visibility. Adjust the scales to your own data. A product that holds health records scores its data higher than one that holds public documents.
Data protection
Data is usually the thing an attacker wants. Protect it where it sits, while it moves and when you recover it.
Encryption at rest
Turn it on for storage, databases and backups. In my scan, three separate checks failed because data was not encrypted at rest.
Encryption in transit
Require secure connections between users, services and databases.
Key management
Use the provider's key service, rotate keys and limit who can use them. Never place keys in code.
Classification
Know which data is sensitive, so you can protect it more strongly.
Access
Grant access to data by role, and log every read of sensitive stores.
Deletion
Remove data you no longer need, because stored data is data that can leak.
Encryption helps only if keys and access are controlled. An encrypted bucket that any account can read through a loose policy is not protected.
Backup and recovery
Backups are your last line of defense against ransomware, mistakes and failures. They fail in predictable ways. Backups live in the same account as the data, so an intruder deletes both. Nobody tests a restore until the day it matters. Backups run too rarely to be useful.
Two numbers drive the design. The recovery point is how much data you can afford to lose, which backup frequency controls. The recovery time is how long you can be down, which restore speed controls.
I modeled a system with 500 GB of data. Backups every 24 hours risk losing up to 24 hours of data, every 6 hours up to 6 hours and every hour up to 1 hour. Restore time depends on throughput.
| Restore speed (decimal units) | Time to restore 500 GB |
|---|---|
| 100 MB per second | About 83 minutes |
| 25 MB per second | About 333 minutes, or about 5.6 hours |
A fourfold difference in speed changes a short outage into most of a working day. Test your actual restore speed, because the number on a plan is rarely the number you get.
Keep copies in a separate account with separate credentials, and make them immutable where the service allows. Test a full restore at least once a year, and after major changes.
Network exposure
Internet-facing systems are scanned constantly by automated tools, and a newly exposed service can start receiving probes quickly. I did not measure how quickly, and it varies. Reduce what is reachable. Keep databases and internal services on private networks, and put administration behind a controlled path.
In my test, the security group allowed SSH from anywhere, and the scanner flagged it. In the hardened version, I limited it to one office range, using the placeholder address 203.0.113.0/24, which is reserved for documentation and must be replaced with your real office range. In practice, many teams go further and remove direct administration access, using a managed access service with sign-in and logs.
Check exposure from the outside as well as the inside. List every public address, port and hostname, and compare it with what you think is public. Surprises are common, especially with test systems that were never removed.
Edge devices deserve extra care, because they sit on the boundary and attackers favor them. Our zero-day vulnerability guide shows that nearly half of zero-days exploited in 2025 hit enterprise products, with a large share in security and networking gear.
Patching and known exploited flaws
Cloud workloads run software that needs updates. Virtual machines need operating system patches. Containers need base image updates. Libraries need version updates. Managed services patch themselves, but you still control versions and settings.
Prioritize patches for internet-facing systems and for flaws that attackers are known to use. CISA's catalog of known exploited vulnerabilities lists them. In my analysis of that catalog, a quarter of entries had CVE identifiers from 2018 or earlier, which shows how long old flaws stay useful to attackers. Our zero-day guide includes the models for patch speed and priority scoring.
Logging and detection
You cannot respond to what you cannot see. Cloud providers offer logs of administrative actions and, separately, logs of network and application activity. Turn them on, send them to a place that an intruder cannot easily erase and make sure a person or an automated rule reads them.
| Log source | What it shows | Example alert |
|---|---|---|
| Administrative activity | Who changed what in the account | A new administrator created at night |
| Sign-in events | Successful and failed logins | Many failures, then a success |
| Network flow | Traffic between systems | A server sending large data to an unknown address |
| Application logs | What your software did | A spike in errors or unusual requests |
| Storage access | Who read or wrote data | A bulk download from a sensitive bucket |
| Key use | Who used encryption keys | A key used from a new location |
Logs cost money to store. I modeled 200 servers that each produce 50 MB of logs a day. That is 10 GB a day. Keeping 90 days needs 900 GB, and keeping a year needs 3,650 GB. The NCSC's thirteenth principle asks that customers can get the audit information and alerts they need, which is also a prompt to ask what your provider supplies.
Decide retention by need. A short retention for noisy network logs and a longer one for administrative and sign-in logs is common. Keep what you need for investigations and for any rules that apply to you.
Alerts people act on
An alert that nobody reads is not a control. Start with a few high-value alerts: new administrators, changes to logging, sign-ins without multi-factor authentication, public exposure of storage and use of the most powerful accounts. Tune them until each one is worth waking someone for.
Common cloud security risks
This table lists the risks that appear most often. It is our analysis, based on the controls above.
| Risk | What it looks like | Main defense |
|---|---|---|
| Misconfiguration | A public bucket or open port | Configuration as code, scanning and review |
| Over-privileged accounts | Wildcard policies, administrator rights for all | Least privilege and regular review |
| Weak sign-in | Passwords without a second factor | Multi-factor authentication |
| Leaked keys and secrets | Keys in code, chat or logs | Vaults, rotation and secret scanning |
| Unpatched systems | Old software on exposed servers | Inventory and fast patching |
| Insecure interfaces | Unprotected or unauthenticated APIs | Authentication, rate limits and testing |
| Missing logs | No record of what happened | Central, protected logging |
| Shadow IT | Services bought without review | Approval process and discovery |
| Supply chain | Compromised libraries or images | Pinned versions, scanning and trusted sources |
| Weak recovery | Untested backups | Separate copies and restore drills |
Software as a service and third-party apps
Many organizations use dozens of software as a service products. The provider secures the application, but you still control who signs in, what data goes in and which other apps connect. Common problems include accounts without multi-factor authentication, former employees whose access remains and third-party apps granted broad permissions.
Use central sign-in where you can, and review connected apps regularly. Our single sign-on guide explains how central sign-in reduces risk, and our guide to SaaS authentication compares the options if you are building a product.
Containers and serverless
Containers and serverless functions change who patches what. In containers, you update base images and libraries. In serverless, the provider runs the infrastructure, and you secure the code, its permissions and its inputs.
Give each workload its own narrow identity
A function that reads one bucket should not be able to delete the account.
Scan images and dependencies
Check them before they ship.
Pin versions
Know exactly what runs.
Limit network paths
Allow only the connections that are needed.
Keep secrets out of images
Inject them at run time.
Building security into delivery
Security works best when it is part of how you build, not a gate at the end. Put checks in the pipeline: scan configuration and secrets, check dependencies for known flaws and require review for changes to permissions and network rules.
Treat infrastructure as code. When settings live in files under version control, you can review changes, roll them back and scan them automatically. When people click through consoles, you lose the record, and settings drift from what you think they are.
Our SaaS starter kits comparison shows how to review a kit's dependencies and defaults before you build on it, which applies to any code you bring into your cloud.
To know which dependencies a workload contains, keep a software bill of materials for it. Our SBOM guide shows what one lists and what generators leave out.
For the application layer, our OWASP Top 10 guide walks through the ten risk categories with a tested example of each.
To choose scanners for the pipeline, see our SAST vs DAST vs SCA comparison, which runs four tools against one app with planted flaws.
Compliance and frameworks
Frameworks give structure. The NCSC principles above help you assess services. Other widely used frameworks and benchmarks list controls in more detail, and many customers ask which you follow. Pick a framework that fits your customers and region, map your controls to it and keep evidence.
Compliance is not the same as security. A company can meet a framework and still have gaps, and a company can be secure without a certificate. Use frameworks as a guide, and test your real controls.
Cloud security tools
Several tool categories exist. Names vary, and products often combine them.
| Category | What it does |
|---|---|
| Cloud security posture management | Continuously checks cloud settings against rules |
| Infrastructure as code scanning | Checks configuration files before deployment, as Checkov does |
| Secrets scanning | Finds keys and passwords in code and logs |
| Workload protection | Watches servers and containers for threats |
| Cloud access security broker | Monitors and controls use of software as a service |
| Identity governance | Reviews who has access to what |
| Log and event analysis | Collects and analyzes logs and raises alerts |
You do not need every category. Start with identity controls, configuration scanning and logging, then add others as your environment grows.
Identity hygiene in detail
Identity problems cause a large share of cloud incidents, so it is worth going beyond the basics. These checks apply to any provider.
| Check | What to look for |
|---|---|
| Root or owner account | Used only for rare tasks, protected by a hardware key or strong multi-factor sign-in, with no access keys |
| Human users | Personal accounts, multi-factor sign-in and central sign-in where possible |
| Service identities | One per workload, with narrow permissions |
| Long-lived keys | Replace them with short-lived credentials where the platform supports it |
| Unused accounts and keys | Disable what has not been used for a set period |
| Administrator group | Small, reviewed often, with changes logged |
| Cross-account access | Documented and limited to named roles |
| Emergency access | A tested break-glass account, stored safely and alarmed |
The root account deserves special mention, because it can do anything. Many teams create it, protect it and never touch it again. Keep its sign-in details in a safe place, and set an alert for any use.
Review access on a schedule. Every quarter, list who can administer each account, and remove anyone who no longer needs it. People accumulate permissions over time, and old access is a favorite route for attackers.
Separating accounts and environments
A single cloud account for everything makes every mistake bigger. Splitting work into several accounts or projects limits the damage when one is compromised.
A common pattern uses separate accounts for production, development and testing, plus one for security logs and one for backups. A stolen key in the testing account cannot touch production data, and an intruder cannot erase the logs that record what happened.
I modeled the blast radius with invented numbers. Suppose a company runs 20 services and a leaked credential gives access to everything in one account. With one account, all 20 services are exposed. If services are spread over four accounts of five each, a single leaked credential exposes five.
| Layout | Services reachable with one leaked credential | Share of the estate |
|---|---|---|
| One account | 20 | 100% |
| Four accounts | 5 | 25% |
| Ten accounts | 2 | 10% |
More accounts mean more to manage, so use central tools for identity, logging and policy. The principle is to size your boundaries so that one failure does not reach everything.
Preparing for an incident
Plan before something goes wrong. A short list of first actions saves time when stress is high.
| First action | Why |
|---|---|
| Confirm and record what you see | A clear picture prevents wrong moves |
| Contain the access | Disable or rotate the credential, and block the route |
| Preserve evidence | Keep logs and snapshots before changing systems |
| Find the scope | Which accounts, data and systems were touched |
| Tell the right people | Leaders, legal, customers as required |
| Recover safely | Restore from clean backups, and close the route first |
| Learn | Record what happened, and fix the gap |
Credentials are often the cause. Know how to rotate every key and token quickly, and keep the list of where each one is used. Our privileged access management guide covers limiting what an intruder can do with a stolen powerful account.
What security costs, and where to start
Not every control costs the same, and not every organization can do everything at once. This table is our judgment of where to start by size.
| Organization | Start with | Add next |
|---|---|---|
| Solo founder or tiny team | Multi-factor sign-in, private storage, automatic updates, backups | Logging and a simple scanner in the pipeline |
| Small company | The above, plus least privilege and central sign-in | Separate accounts and alerts |
| Growing company | The above, plus configuration as code and secrets scanning | Posture management, formal reviews and exercises |
| Large organization | The above, at scale, with central governance | Dedicated security staff and continuous testing |
Some of the cheapest controls are also among the most useful. Multi-factor sign-in, private data stores and tested backups cost little and address many common attacks, though no control stops them all. Add expensive tools once you have the basics.
Questions to ask a cloud vendor
Before you rely on a service, ask questions drawn from the NCSC's principles.
- How is my data separated from other customers' data?
- Is data encrypted in transit and at rest, and who controls the keys?
- What logs can I get, and for how long?
- How do you manage vulnerabilities and tell customers about incidents?
- Who at your company can access my data, and how is it limited?
- What happens to my data if I leave?
- Which certifications or audits can you share?
- What parts of security are my responsibility for this service?
The last question matters most. A vendor who cannot clearly state your share of the responsibility is a risk.
Getting started: a 90-day plan
This plan is our suggestion.
Days 1 to 15
Take stock. List accounts, services, public addresses and who administers what.
Days 16 to 30
Secure identity. Require multi-factor authentication, remove unused accounts and review administrator rights.
Days 31 to 45
Close exposure. Make data stores private, restrict administration ports and enable encryption.
Days 46 to 60
Turn on logging. Send logs to a protected place, and create a short list of alerts.
Days 61 to 75
Automate checks. Add configuration and secrets scanning to the pipeline.
Days 76 to 90
Test recovery. Restore from backup, and rehearse your response to a lost credential.
Myths about cloud security
Some beliefs lead teams to skip controls. This table lists common ones and what is more accurate.
| Myth | What is more accurate |
|---|---|
| The provider secures everything | The provider secures the infrastructure, and you secure your data, access and configuration |
| Encryption alone protects data | Keys and access control decide who can read it |
| Small companies are not targets | Attackers scan the internet for exposed systems and do not choose by size |
| A scanner result of zero means safe | A scanner checks only what its rules cover, and it missed a hard-coded password in my test |
| Cloud is always more secure than a server room | It can be, with good configuration and access control, and it can be worse without them |
| Compliance means secure | It shows you met a framework and does not prove you have no gaps |
Measuring progress
Track a handful of numbers, and review them monthly. They show whether your cloud security is improving.
| Measure | What it shows |
|---|---|
| Share of human accounts with multi-factor sign-in | Strength of identity controls |
| Number of public data stores | Exposure |
| Findings by severity, and age of open ones | How fast you fix problems |
| Share of changes scanned before deployment | Coverage of automation |
| Time to rotate a leaked credential | Readiness |
| Last successful restore test | Confidence in recovery |
| Alerts handled per week | Whether detection works |
A falling number of high-severity findings and a rising share of scanned changes are good signs. A last restore date from last year is a warning.
Common mistakes
Assuming the provider handles it
Shared responsibility means you handle your part.
Public data by accident
Check every store.
Broad permissions
Wildcard policies grant far more than needed.
No second factor
Passwords alone are weak.
Secrets in code
They leak through repositories and logs.
Logs nobody reads
Detection needs people or rules.
Untested backups
A restore that fails is discovered too late.
Trusting one scanner
Tools miss things, as my test showed.
Chasing zero findings
Focus on serious ones first.
Manual changes
They cause drift and hide history.
Reproduce the test
This script writes the two Terraform files I used, installs and runs Checkov, runs its secrets mode and calculates the ranking, backup and log storage figures. Use a virtual environment for the install. The Terraform examples are for static scanning only and are not meant to be deployed unchanged, because they use placeholder values such as the documentation-only address 203.0.113.0/24 and a sample password. Checkov's rule library changes between versions, so your counts may differ from mine, which used version 3.3.30.
mkdir -p insecure hardened
cat > insecure/main.tf <<'TF'
resource "aws_s3_bucket" "data" {
bucket = "example-customer-data"
}
resource "aws_s3_bucket_acl" "data" {
bucket = aws_s3_bucket.data.id
acl = "public-read"
}
resource "aws_security_group" "admin" {
name = "admin-access"
ingress {
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["0.0.0.0/0"]
}
}
resource "aws_db_instance" "main" {
identifier = "app-db"
engine = "postgres"
instance_class = "db.t3.medium"
allocated_storage = 20
publicly_accessible = true
storage_encrypted = false
username = "admin"
password = "changeme123"
}
resource "aws_iam_policy" "app" {
name = "app-policy"
policy = jsonencode({
Version = "2012-10-17"
Statement = [{
Effect = "Allow"
Action = "*"
Resource = "*"
}]
})
}
resource "aws_ebs_volume" "logs" {
availability_zone = "us-east-1a"
size = 50
encrypted = false
}
TF
cat > hardened/main.tf <<'TF'
resource "aws_kms_key" "data" {
description = "data key"
enable_key_rotation = true
}
resource "aws_s3_bucket" "data" {
bucket = "example-customer-data"
}
resource "aws_s3_bucket_public_access_block" "data" {
bucket = aws_s3_bucket.data.id
block_public_acls = true
block_public_policy = true
ignore_public_acls = true
restrict_public_buckets = true
}
resource "aws_s3_bucket_server_side_encryption_configuration" "data" {
bucket = aws_s3_bucket.data.id
rule {
apply_server_side_encryption_by_default {
sse_algorithm = "aws:kms"
kms_master_key_id = aws_kms_key.data.arn
}
}
}
resource "aws_s3_bucket_versioning" "data" {
bucket = aws_s3_bucket.data.id
versioning_configuration {
status = "Enabled"
}
}
resource "aws_security_group" "admin" {
name = "admin-access"
description = "SSH from the office network only"
ingress {
description = "SSH from office"
from_port = 22
to_port = 22
protocol = "tcp"
cidr_blocks = ["203.0.113.0/24"]
}
}
resource "aws_db_instance" "main" {
identifier = "app-db"
engine = "postgres"
instance_class = "db.t3.medium"
allocated_storage = 20
publicly_accessible = false
storage_encrypted = true
kms_key_id = aws_kms_key.data.arn
iam_database_authentication_enabled = true
backup_retention_period = 7
multi_az = true
deletion_protection = true
auto_minor_version_upgrade = true
username = "dbadmin"
manage_master_user_password = true
}
resource "aws_iam_policy" "app" {
name = "app-policy"
policy = jsonencode({
Version = "2012-10-17"
Statement = [{
Effect = "Allow"
Action = ["s3:GetObject", "s3:PutObject"]
Resource = "arn:aws:s3:::example-customer-data/*"
}]
})
}
resource "aws_ebs_volume" "logs" {
availability_zone = "us-east-1a"
size = 50
encrypted = true
kms_key_id = aws_kms_key.data.arn
}
TF
pip install checkov==3.3.30
for dir in insecure hardened; do
checkov -d $dir --framework terraform --compact --quiet -o json > $dir.json
done
checkov -d insecure --framework secrets --compact --quiet
python3 - <<'PY'
import collections
import json
for name in ("insecure", "hardened"):
data = json.load(open(f"{name}.json"))
data = data[0] if isinstance(data, list) else data
summary = data["summary"]
by_resource = collections.Counter(item["resource"] for item in data["results"]["failed_checks"])
print(name, "passed", summary["passed"], "failed", summary["failed"], dict(by_resource))
findings = {
"Hard-coded database password": (2, 3, 2),
"Public customer data bucket": (3, 3, 1),
"Public unencrypted database": (3, 3, 1),
"SSH open to the internet": (3, 1, 2),
"Wildcard IAM policy": (1, 2, 3),
"Unencrypted volume": (0, 2, 0),
"No access logging": (0, 1, 0),
}
for label, (exposure, sensitivity, privilege) in sorted(findings.items(), key=lambda item: -((item[1][0] + 1) * (item[1][1] + 1) * (item[1][2] + 1))):
print(label, (exposure + 1) * (sensitivity + 1) * (privilege + 1))
for backups, hours in (("daily", 24), ("every 6 hours", 6), ("every hour", 1)):
print("backup", backups, "worst-case data loss", hours, "hours")
for speed in (100, 25):
print("restore 500 GB at", speed, "MB per second:", round(500 * 1000 / speed / 60), "minutes")
print("log storage, 200 servers at 50 MB a day: 90 days", 200 * 50 * 90 / 1000, "GB; 365 days", 200 * 50 * 365 / 1000, "GB")
PY
Frequently asked questions
What is cloud security?
The practices and tools that protect data, applications and infrastructure running on cloud services, including identity, encryption, configuration, logging and recovery.
What are cloud security fundamentals?
Identity and access control, data protection, secure configuration, network limits, logging and monitoring, patching and tested backups, all based on knowing what you are responsible for.
What is the shared responsibility model?
A division of duties. AWS describes it as security of the cloud, which the provider handles, and security in the cloud, which the customer handles. Microsoft says customers always keep responsibility for their data and endpoints.
What are cloud security best practices?
Use multi-factor sign-in, least privilege, encryption, private data stores, central logging, fast patching, configuration scanning and tested backups. Automate checks in your pipeline.
What are the biggest cloud security risks?
Misconfiguration, over-privileged accounts, weak sign-in, leaked secrets, unpatched systems, insecure interfaces, missing logs and weak recovery.
What does cloud security cost?
It depends on the tools and the logging volume you choose. Many controls, such as multi-factor sign-in and private storage, cost little. Log storage grows with volume, as the 200-server example shows.
Is there a cloud security checklist, and what is a cloud security scanner?
A tool that checks cloud settings or infrastructure code against rules. Checkov, which I used, scans Terraform files and found 33 failed checks in my insecure example.
Is the cloud less secure than on-premises systems?
It depends on how you use it. Providers secure the infrastructure at large scale, but customer misconfiguration and weak access control can expose data in any environment.
What are the NCSC cloud security principles?
Fourteen principles for assessing cloud services, from data in transit protection to secure use of the service. The last one is the customer's own responsibility.
What are cloud security basics for a small business?
Turn on multi-factor sign-in, keep data stores private, encrypt data, enable logging, keep software updated and test your backups.
How do I secure an AWS account?
Protect the root account, require multi-factor sign-in, use least privilege roles, block public access to storage, turn on logging and scan your configuration.
Does a scanner replace a security review?
No. A scanner checks what its rules cover. My test showed it missed a hard-coded password until I ran a separate secrets mode.
A quick checklist
From circuittimes.com/security/cloud-security-fundamentals/
Was this guide helpful?
What went wrong?
The briefing, without the noise.
The stories that matter in technology, every weekday morning.
Free. Unsubscribe in one click.