awscan is a lightweight AWS security scanner.
It performs baseline checks for:
- S3
- IAM
- Security Groups
- VPC / Subnets / Routes / IGW
Results are shown in the console and can be saved as JSON (report.json).
- Baseline cloud misconfiguration checks (S3, IAM, SG, VPC, Subnets, Routes, IGW)
- Exploit-path detection for chained issues (public exposure + risky IAM)
- Graph-based exploit-path detection (instance -> instance profile -> IAM role -> admin permissions)
- Advanced checks:
- CloudTrail presence
- Root account MFA
- IAM Access Analyzer presence
- EBS encryption at rest
- IMDSv2 enforcement on EC2
- Risk scoring and prioritized findings
- Finding quality metadata:
- confidence score
- explicit evidence
- false-positive validation notes
- Mapping to security frameworks:
- CIS AWS Foundations
- NIST SP 800-53
- MITRE ATT&CK (Cloud-relevant techniques)
- Remediation guidance and impact context per finding
- Primary execution: GitHub Actions (CI/CD).
- Local execution:
.envfor local testing and manual runs.
- Create
.envfrom.env.example. - Fill in AWS variables.
- Run:
./bin/awscan --json-out report.jsonExamples:
# Exit with code 1 if HIGH/CRITICAL findings exist
./bin/awscan --json-out report.json --fail-on HIGH
# Run tests
python -m unittest discover -s tests -p "test_*.py"Important: .env is for local runs only.
In CI, values are loaded from GitHub Secrets/Variables.
Workflow: .github/workflows/main.yml
Triggers:
pushtomain- manual run via
workflow_dispatch
Job steps:
- Install dependencies
- Run unit tests
- Run
awscanwith--json-out report.json --fail-on HIGH - Publish a summary in GitHub Actions
- Upload
report.jsonas an artifact - Send status + report to Telegram (if bot token/chat ID are configured)
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGIONTELEGRAM_BOT_TOKENTELEGRAM_CHAT_ID
AWSCAN_AWS_MAX_ATTEMPTSAWSCAN_AWS_RETRY_MODEAWSCAN_AWS_CONNECT_TIMEOUTAWSCAN_AWS_READ_TIMEOUT
After a workflow run:
- Actions tab → specific run: logs and summary
- Artifacts section:
awscan-report(report.json) - Telegram: status message + report file
