Hacktoberfest 2026: những issue maintainer đã đánh dấu cho tháng Mười, đang mở và phù hợp người mới. Xem issue Hacktoberfest

[Bug] fast/stages-aw/3-security, scripts: fix cross-env KMS admin grant, VPC-SC dry-run status, and script input handling

Đang mở
#371 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 1 ngày

@LeonxLJX đang làm issue này rồi.

Từ ngày 28/10/2026.

  • #377 của @LeonxLJX — đang mở

Đánh giá

Độ khó
4/5
Thời gian dự kiến
3-5 ngày
Mức phù hợp với người mới
45/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
bash, gcp, shell, terraform

Hướng nghiên cứu

Start with fast/stages-aw/3-security/core-dev.tf and core-prod.tf, comparing KMS grants for the dp, gke, gcve, and pf service accounts, then read vpc-sc.tf and outputs.tf for the dry-run status and file/CMEK handling. The script fixes are spread across sa_lockdown.sh, validation.sh, scripts/destroy.sh, scripts/restore.sh, tools/create_e2e_sandbox.sh, and generate-mocks.sh; inspect each listed line and run the relevant Stage 3 Terraform checks and script validations. Done means all six expected behaviors in the issue hold without changing unrelated permissions or script behavior.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

Bug Framework - FedRAMP High Framework - IL5 Level of Effort - Low Priority - High Scope - Fast Security

Bug Description

fast/stages-aw/3-security and the repository automation scripts contain several security and functional defects on main at commit db8271cf.

  1. fast/stages-aw/3-security/core-dev.tf grants var.service_accounts["project-factory-prod"] roles/cloudkms.admin and roles/cloudkms.cryptoKeyEncrypterDecrypter on development KMS keys, while omitting the gke-dev and gcve-dev service accounts. Similarly, core-prod.tf omits gke-prod and gcve-prod.
  2. fast/stages-aw/3-security/vpc-sc.tf sets status = var.vpc_sc.dry_run ? null : local.perimeter_status. Setting status = null when dry_run = true removes any existing enforced VPC Service Controls perimeter configuration instead of preserving the enforced status block alongside spec.
  3. fast/stages-aw/3-security/outputs.tf writes 3-security.auto.tfvars.json with 0644 permissions and uploads it to the automation GCS bucket without kms_key_name.
  4. fast/stages-aw/3-security/sa_lockdown.sh only removes roles for 4 service accounts, missing the -r read-only plan service accounts and Stage 1 branch service accounts, and validation.sh filters only -prod-iac-core-0$.
  5. scripts/destroy.sh uses eval "$var_name="$input"" when reading interactive user input instead of printf -v, scripts/restore.sh contains a broken terraform import "module.organization.google_org_policy_policy.default["{}"]" command, tools/create_e2e_sandbox.sh contains a tocuh typo, and generate-mocks.sh references a non-existent 2-networking-a-fedramp-high directory.

Expected Behavior

  • core-dev.tf and core-prod.tf grant KMS permissions only to matching environment service accounts for dp, gke, gcve, and pf.
  • vpc-sc.tf preserves enforced perimeter status when spec dry-run mode is enabled.
  • outputs.tf restricts local file permissions to 0600 and encrypts the uploaded 3-security.auto.tfvars.json object with CMEK.
  • sa_lockdown.sh, validation.sh, scripts/destroy.sh, scripts/restore.sh, tools/create_e2e_sandbox.sh, and generate-mocks.sh run safely without eval injection or broken paths.

Additional Context

Tracked under #33. Split out from #350 so Stage 3 and script fixes can be reviewed in isolated pull requests.

Ngôn ngữ chính
HCL
Star
58
Fork
25
Merge trung bình
1 ngày 22 giờ
Pull request đã merge (30 ngày)
69

Chuẩn bị môi trường

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của google/stellar-engine

Tất cả issue của google/stellar-engine

Issue tương tự

Thêm issue về Cloud

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.