fix(security): harden IAM conditions, FAST stages, repository tools, and blueprints - #274
Open
aghassemlouei wants to merge 5 commits into
Open
aghassemlouei wants to merge 5 commits into
aghassemlouei wants to merge 5 commits into
Conversation
aghassemlouei
marked this pull request as ready for review
September 28, 2026 19:40
aghassemlouei
enabled auto-merge (squash)
September 28, 2026 19:40
aghassemlouei
requested review from
Calvin-Cheng1,
LanceWray,
lynn-goog and
michael-intindola
September 28, 2026 19:41
…nst injection and crashes
aghassemlouei
force-pushed
the
fix/fortify-security-remediation
branch
4 times, most recently
from
September 29, 2026 18:18
0988fd4 to
70b33ff
Compare
…coping, and checklist validation
…rmissions, and NGFW/VPC-SC controls
aghassemlouei
force-pushed
the
fix/fortify-security-remediation
branch
from
October 1, 2026 00:53
70b33ff to
caffde5
Compare
Member
Author
|
Spoke with @Calvin-Cheng1 and he mentioned that we should shift any relevant files for anything within modules to the upstream CFF repository. |
…gs, and shell execution across blueprints
aghassemlouei
force-pushed
the
fix/fortify-security-remediation
branch
from
October 1, 2026 17:33
caffde5 to
7472a15
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This pull request bundles non-breaking security hardening and correctness fixes across repository tooling, FAST foundation stages (
0-bootstrap,1-resman,2-networking,3-security), and compliance blueprints (fedramp-highandil5).Shared Terraform module changes originally developed alongside this branch have been split out into #275 (Stellar Engine custom modules), #276 (modules already fixed in upstream Cloud Foundation Fabric), and upstream Cloud Foundation Fabric pull requests (
GoogleCloudPlatform/cloud-foundation-fabric#4198-#4232).Repository Tooling
tools/validate_metadata.py,tools/check_documentation.py,tools/check_links.py, andtools/tfdoc.pyagainst symlink traversal, path escape, and malformed Markdown heading ASTs.csv.writerintools/state_iam.pyto prevent CSV injection and fix the IAM resource regular expression so service-specific IAM resources are matched accurately.tools/check_links.pyto prevent SSRF during external link validation.tools/pre-commit-tfdoc.shandtools/DuplicateFileFinder.pyto safely handle file paths containing whitespace or special characters.FAST Stages (0-bootstrap, 1-resman, 2-networking, 3-security)
fast/stages-aw/0-bootstrap/organization.tfandfast/stages-aw/3-security/main.tfwithapi.getAttribute('iam.googleapis.com/modifiedGrantsByRole', []).size() > 0sohasOnly()cannot evaluate vacuously true when non-listed roles are modified.roles/iam.serviceAccountAdminandroles/iam.serviceAccountTokenCreatorinfast/stages-aw/0-bootstrap/automation.tfwith CEL conditions that exclude the Stage 0 bootstrap automation service accounts (bootstrap_0andbootstrap_r_0), preventing cross-stage privilege escalation from Stage 1 resource management orgcp-devops.fast/stages-aw/0-bootstrap/checklist.tfandfast/stages-aw/1-resman/checklist.tfto convert numeric organization IDs viatostring()before comparison and guard bucket substring checks whenvar.prefixis null.0600permissions across Stage 0 and Stage 1, and remove world-writable0777directory permissions in Stage 2 NGFW outputs.^...$) across Stage 1 CI/CD configurations so prefix or substring branch names cannot inadvertently trigger production pipelines.nva.tf), remove the overprivileged default Compute Engine service account from the NGFW bootstrap bucket binding (ngfw.tf), pass NGFW passwords toopenssl passwdvia-stdin(openssl-helper.sh), and quote variable expansions in Stage 0 and Stage 3 helper scripts.Compliance Blueprints
rule_3Cloud Armor WAF action inblueprints/fedramp-high/gemini-enterprise/gemini-stage-0/cloudarmor.tffromallowtodeny(403).curlvia standard input (-H @-) inblueprints/fedramp-high/gemini-enterprise/gem4gov-cli/gem4gov.pyanddeploy.shso access tokens are not exposed in process argument lists, and replacerandom.choiceswithsecrets.choiceindata_stores.py.blueprints/fedramp-high/gemini-enterprise/analytics/Dockerfileas a non-root user and escape user identity strings before rendering HTML (main.py).terraform.tfvars.sample) acrosscnap,cloud-functions,cloud-build,bigquery,gke,secops,vertex-ai, andvision-aiblueprints.Type of Change
Deployment & Compliance Impact
Checklist
Code Quality & Reusability
modules/orfast/can be leveraged for this change.documentation/naming-convention.md.Documentation
README.mdof the modified module or blueprint.Security
Testing
Testing Performed
tests/tools/test_blueprint_and_module_validations.py,tests/tools/test_bootstrap_logging_order.py,tests/tools/test_check_boilerplate.py,tests/tools/test_gemini_enterprise_fixes.py,tests/tools/test_stage2_networking.py,tests/tools/test_state_iam.py,tests/tools/test_tfdoc.py) and verified all Python unit tests, shell syntax checks, shell unit tests, and Python AST checks pass.var.*,local.*,module.*,google_*resources, variable type definitions, and blueprintterraform.tfvars.samplevariable parity) across all Terraform directories underfast/andblueprints/.terraform initandterraform planagainst an Argolis validation organization across all 5 FAST stages (0-bootstrap,1-resman,2-networking-a-fedramp,2-networking-b-il5-ngfw,3-security) and all 36 modified blueprint directories.