-
Notifications
You must be signed in to change notification settings - Fork 3
feat: add production infrastructure #114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,44 @@ | ||
| # Production infrastructure (AWS) | ||
|
|
||
| # VULN 1: Publicly readable S3 bucket — backup objects exposed to the internet. | ||
| resource "aws_s3_bucket" "backups" { | ||
| bucket = "corp-prod-backups" | ||
| acl = "public-read" | ||
| } | ||
|
|
||
| resource "aws_s3_bucket_public_access_block" "backups" { | ||
| bucket = aws_s3_bucket.backups.id | ||
| block_public_acls = false | ||
| block_public_policy = false | ||
| ignore_public_acls = false | ||
| restrict_public_buckets = false | ||
| } | ||
|
|
||
| # VULN 2: Security group open to the entire internet on every port (incl. SSH). | ||
| resource "aws_security_group" "open" { | ||
| name = "allow-all" | ||
|
|
||
| ingress { | ||
| from_port = 0 | ||
| to_port = 65535 | ||
| protocol = "-1" | ||
| cidr_blocks = ["0.0.0.0/0"] | ||
| } | ||
| } | ||
|
Comment on lines
+18
to
+27
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The security group Steps to Reproduce
Fix with AITriage: Reply There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A fix for this finding has been opened: #122 |
||
|
|
||
| # VULN 3: Unencrypted, publicly accessible RDS with a hardcoded master password. | ||
| resource "aws_db_instance" "prod" { | ||
| engine = "postgres" | ||
| instance_class = "db.t3.large" | ||
| username = "admin" | ||
| password = "SuperSecret123!" # hardcoded secret committed to source | ||
| storage_encrypted = false # no encryption at rest | ||
| publicly_accessible = true # reachable from the internet | ||
| } | ||
|
Comment on lines
+30
to
+37
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
The Steps to Reproduce
Fix with AITriage: Reply There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A fix for this finding has been opened: #123 |
||
|
|
||
| # VULN 4: Unencrypted EBS volume. | ||
| resource "aws_ebs_volume" "data" { | ||
| availability_zone = "us-east-1a" | ||
| size = 100 | ||
| encrypted = false | ||
| } | ||
|
Comment on lines
+40
to
+44
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The EBS volume is configured with storage encryption disabled, leaving the data at risk in the event of unauthorized access to physical storage or snapshots. Steps to Reproduce
Fix with AITriage: Reply |
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The
aws_s3_bucketnamedbackupsis configured withacl = "public-read", and the associatedaws_s3_bucket_public_access_blockexplicitly disables all public access block protections. This exposes any objects stored in the bucket (such as production backups) to the public internet, allowing unauthenticated users to download sensitive backup files.Steps to Reproduce
testerror/infra.tfusingterraform apply.corp-prod-backups.https://corp-prod-backups.s3.amazonaws.com/<filename>) from an unauthenticated browser session.Fix with AI
Triage: Reply
!fp <reason>(false positive),!valid(confirmed),!accepted_risk <reason>, or!fixed(resolved). Any other reply is saved as a triage note.Reason is optional but improves future scans — e.g.
!fp internal endpoint, not user-facing.View finding in Hacktron
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A fix for this finding has been opened: #121