Skip to content

gcp/service/cloud_security_scanner#373

Open
Om46-coder wants to merge 10 commits into
devfrom
gcp/service/cloud_security_scanner
Open

gcp/service/cloud_security_scanner#373
Om46-coder wants to merge 10 commits into
devfrom
gcp/service/cloud_security_scanner

Conversation

@Om46-coder

Copy link
Copy Markdown

Summary

Added policies for the Terraform resource google_security_scanner_scan_config.

Implemented policy checks for:

  • starting_urls
  • max_qps
  • export_to_security_command_center
  • authentication.custom_account.login_url
  • blacklist_patterns

Documentation

Added documentation explaining:

  • Why each policy argument was included
  • Why other Terraform arguments were excluded
  • Security justification for each policy
  • Testing approach using compliant and non-compliant Terraform files

Documentation file:

docs/gcp/Cloud_Security_Scanner/google_security_scanner_scan_config.md

Testing

Tested each policy using:

  • compliant Terraform file: c.tf
  • non-compliant Terraform file: nc.tf
  • terraform plan -out=tfplan
  • terraform show -json tfplan
  • opa eval

@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

🔍 Policy Check Results

Status: ❌ CHECKS FAILED

⚠️ Your PR will not be reviewed until you fix all policy check failures below:

Test Output

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.starting_urls.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config is using insecure HTTP starting URLs.', 'Non-Compliant Resources: None - All passed']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 0
 Missing mentions: c, nc
Check failed: Unmentioned resources other than 'c' found: nc

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.max_qps.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config has max_qps higher than the approved security limit.', 'Non-Compliant Resources: non-compliant-security-scanner', 'Potential Remedies: Set max_qps to 15 or lower.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 0
 Missing mentions: c, nc
Check failed: Unmentioned resources other than 'c' found: nc

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.blacklist_patterns.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config does not exclude sensitive URL patterns.', 'Non-Compliant Resources: non-compliant-security-scanner', 'Potential Remedies: Add blacklist_patterns for sensitive paths such as admin, logout, delete, payment, or account pages.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 0
 Missing mentions: c, nc
Check failed: Unmentioned resources other than 'c' found: nc

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.export_to_security_command_center.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner findings are not being exported to Security Command Center.', 'Non-Compliant Resources: non-compliant-security-scanner', 'Potential Remedies: Set export_to_security_command_center to ENABLED.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 0
 Missing mentions: c, nc
Check failed: Unmentioned resources other than 'c' found: nc

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.custom_account_login_url.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Custom account authentication is using an insecure login URL.', 'Non-Compliant Resources: None - All passed']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 0
 Missing mentions: c, nc
Check failed: Unmentioned resources other than 'c' found: nc


Summary of policy checks:
Service: cloud_security_scanner
  Resource: google_security_scanner_scan_config
    Policy: starting_urls - ❌
    Policy: max_qps - ❌
    Policy: blacklist_patterns - ❌
    Policy: export_to_security_command_center - ❌
    Policy: custom_account_login_url - ❌


Failures:
Service: cloud_security_scanner | Resource: google_security_scanner_scan_config | Policy: starting_urls
Unmentioned resources other than 'c' found: nc

Service: cloud_security_scanner | Resource: google_security_scanner_scan_config | Policy: max_qps
Unmentioned resources other than 'c' found: nc

Service: cloud_security_scanner | Resource: google_security_scanner_scan_config | Policy: blacklist_patterns
Unmentioned resources other than 'c' found: nc

Service: cloud_security_scanner | Resource: google_security_scanner_scan_config | Policy: export_to_security_command_center
Unmentioned resources other than 'c' found: nc

Service: cloud_security_scanner | Resource: google_security_scanner_scan_config | Policy: custom_account_login_url
Unmentioned resources other than 'c' found: nc


@github-actions

github-actions Bot commented May 7, 2026

Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.starting_urls.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config is using insecure HTTP starting URLs.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use HTTPS URLs in starting_urls.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.max_qps.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config has max_qps higher than the approved security limit.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set max_qps to 15 or lower.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.blacklist_patterns.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config does not exclude sensitive URL patterns.', 'Non-Compliant Resources: nc', 'Potential Remedies: Add blacklist_patterns for sensitive paths such as admin, logout, delete, payment, or account pages.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.export_to_security_command_center.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner findings are not being exported to Security Command Center.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set export_to_security_command_center to ENABLED.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.custom_account_login_url.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Custom account authentication is using an insecure login URL.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use an HTTPS login_url inside authentication.custom_account.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed


Summary of policy checks:
Service: cloud_security_scanner
  Resource: google_security_scanner_scan_config
    Policy: starting_urls - ✅
    Policy: max_qps - ✅
    Policy: blacklist_patterns - ✅
    Policy: export_to_security_command_center - ✅
    Policy: custom_account_login_url - ✅


@github-actions

Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.starting_urls.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config is using insecure HTTP starting URLs.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use HTTPS URLs in starting_urls.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.max_qps.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config has max_qps higher than the approved security limit.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set max_qps to 15 or lower.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.blacklist_patterns.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config does not exclude sensitive URL patterns.', 'Non-Compliant Resources: nc', 'Potential Remedies: Add blacklist_patterns for sensitive paths such as admin, logout, delete, payment, or account pages.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.export_to_security_command_center.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner findings are not being exported to Security Command Center.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set export_to_security_command_center to ENABLED.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.custom_account_login_url.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Custom account authentication is using an insecure login URL.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use an HTTPS login_url inside authentication.custom_account.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed


Summary of policy checks:
Service: cloud_security_scanner
  Resource: google_security_scanner_scan_config
    Policy: starting_urls - ✅
    Policy: max_qps - ✅
    Policy: blacklist_patterns - ✅
    Policy: export_to_security_command_center - ✅
    Policy: custom_account_login_url - ✅


@github-actions github-actions Bot added the CI-Approved PR approved by CI checks label May 11, 2026
@Sundi202 Sundi202 self-assigned this May 13, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi could you please include your json doc as well.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Did you generate your plan.json?

"condition": "starting_urls must not use insecure HTTP",
"attribute_path": ["starting_urls", 0],
"values": ["http://example.com"],
"policy_type": "blacklist",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use pattern blacklist for this.

@Sundi202 Sundi202 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi your json document is missing and it seems like you did not generate a plan.json in your input folder because your terraform.lock is missing

@github-actions

Copy link
Copy Markdown

🔍 Policy Check Results

Status: ❌ CHECKS FAILED

⚠️ Your PR will not be reviewed until you fix all policy check failures below:

Test Output

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.starting_urls.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config is using insecure HTTP starting URLs.', 'Non-Compliant Resources: None - All passed']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 0
 Missing mentions: c, nc
Check failed: Unmentioned resources other than 'c' found: nc

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.max_qps.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config has max_qps higher than the approved security limit.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set max_qps to 15 or lower.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.blacklist_patterns.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config does not exclude sensitive URL patterns.', 'Non-Compliant Resources: nc', 'Potential Remedies: Add blacklist_patterns for sensitive paths such as admin, logout, delete, payment, or account pages.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.export_to_security_command_center.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner findings are not being exported to Security Command Center.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set export_to_security_command_center to ENABLED.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.custom_account_login_url.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Custom account authentication is using an insecure login URL.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use an HTTPS login_url inside authentication.custom_account.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed


Summary of policy checks:
Service: cloud_security_scanner
  Resource: google_security_scanner_scan_config
    Policy: starting_urls - ❌
    Policy: max_qps - ✅
    Policy: blacklist_patterns - ✅
    Policy: export_to_security_command_center - ✅
    Policy: custom_account_login_url - ✅


Failures:
Service: cloud_security_scanner | Resource: google_security_scanner_scan_config | Policy: starting_urls
Unmentioned resources other than 'c' found: nc


@github-actions github-actions Bot added CI-Review-Required PR requires review due to failed CI checks and removed CI-Approved PR approved by CI checks labels May 14, 2026
@github-actions

Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.starting_urls.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config is using insecure HTTP starting URLs.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use HTTPS URLs in starting_urls.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.max_qps.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config has max_qps higher than the approved security limit.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set max_qps to 15 or lower.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.blacklist_patterns.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config does not exclude sensitive URL patterns.', 'Non-Compliant Resources: nc', 'Potential Remedies: Add blacklist_patterns for sensitive paths such as admin, logout, delete, payment, or account pages.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.export_to_security_command_center.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner findings are not being exported to Security Command Center.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set export_to_security_command_center to ENABLED.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.custom_account_login_url.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Custom account authentication is using an insecure login URL.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use an HTTPS login_url inside authentication.custom_account.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed


Summary of policy checks:
Service: cloud_security_scanner
  Resource: google_security_scanner_scan_config
    Policy: starting_urls - ✅
    Policy: max_qps - ✅
    Policy: blacklist_patterns - ✅
    Policy: export_to_security_command_center - ✅
    Policy: custom_account_login_url - ✅


@github-actions github-actions Bot added CI-Approved PR approved by CI checks and removed CI-Review-Required PR requires review due to failed CI checks labels May 14, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hi please give this file a relatable policy name.

@github-actions

Copy link
Copy Markdown

🔍 Policy Check Results

Status: ❌ CHECKS FAILED

⚠️ Your PR will not be reviewed until you fix all policy check failures below:

Test Output

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.export_to_security_command_center.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner findings are not being exported to Security Command Center.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set export_to_security_command_center to ENABLED.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.blacklist_patterns.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config does not exclude sensitive URL patterns.', 'Non-Compliant Resources: nc', 'Potential Remedies: Add blacklist_patterns for sensitive paths such as admin, logout, delete, payment, or account pages.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 0
 Missing mentions: compliant_blacklist_patterns, non_compliant_blacklist_patterns
Check failed: Unmentioned resources other than 'c' found: compliant_blacklist_patterns, non_compliant_blacklist_patterns

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.max_qps.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config has max_qps higher than the approved security limit.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set max_qps to 15 or lower.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.custom_account_login_url.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Custom account authentication is using an insecure login URL.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use an HTTPS login_url inside authentication.custom_account.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.starting_urls.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config is using insecure HTTP starting URLs.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use HTTPS URLs in starting_urls.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed


Summary of policy checks:
Service: cloud_security_scanner
  Resource: google_security_scanner_scan_config
    Policy: export_to_security_command_center - ✅
    Policy: blacklist_patterns - ❌
    Policy: max_qps - ✅
    Policy: custom_account_login_url - ✅
    Policy: starting_urls - ✅


Failures:
Service: cloud_security_scanner | Resource: google_security_scanner_scan_config | Policy: blacklist_patterns
Unmentioned resources other than 'c' found: compliant_blacklist_patterns, non_compliant_blacklist_patterns


@github-actions github-actions Bot added CI-Review-Required PR requires review due to failed CI checks and removed CI-Approved PR approved by CI checks labels May 19, 2026
@github-actions

Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.export_to_security_command_center.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner findings are not being exported to Security Command Center.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set export_to_security_command_center to ENABLED.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.blacklist_patterns.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config does not exclude sensitive URL patterns.', 'Non-Compliant Resources: nc', 'Potential Remedies: Add blacklist_patterns for sensitive paths such as admin, logout, delete, payment, or account pages.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.max_qps.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config has max_qps higher than the approved security limit.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set max_qps to 15 or lower.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.custom_account_login_url.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Custom account authentication is using an insecure login URL.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use an HTTPS login_url inside authentication.custom_account.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.starting_urls.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config is using insecure HTTP starting URLs.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use HTTPS URLs in starting_urls.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed


Summary of policy checks:
Service: cloud_security_scanner
  Resource: google_security_scanner_scan_config
    Policy: export_to_security_command_center - ✅
    Policy: blacklist_patterns - ✅
    Policy: max_qps - ✅
    Policy: custom_account_login_url - ✅
    Policy: starting_urls - ✅


@github-actions github-actions Bot removed the CI-Review-Required PR requires review due to failed CI checks label May 19, 2026
@github-actions github-actions Bot added the CI-Approved PR approved by CI checks label May 19, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wrong config.tf file

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wrong config.tf file

@@ -0,0 +1,6 @@
resource "google_security_scanner_scan_config" "c" {
provider = google-beta

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

values should match your c and nc attributes except the complaint and non-complaint values

@Sundi202 Sundi202 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please resolve all comments and include the doc json file.

@github-actions

Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.export_to_security_command_center.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner findings are not being exported to Security Command Center.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set export_to_security_command_center to ENABLED.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.blacklist_patterns.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config does not exclude sensitive URL patterns.', 'Non-Compliant Resources: nc', 'Potential Remedies: Add blacklist_patterns for sensitive paths such as admin, logout, delete, payment, or account pages.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.max_qps.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config has max_qps higher than the approved security limit.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set max_qps to 15 or lower.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.custom_account_login_url.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Custom account authentication is using an insecure login URL.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use an HTTPS login_url inside authentication.custom_account.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.starting_urls.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config is using insecure HTTP starting URLs.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use HTTPS URLs in starting_urls.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed


Summary of policy checks:
Service: cloud_security_scanner
  Resource: google_security_scanner_scan_config
    Policy: export_to_security_command_center - ✅
    Policy: blacklist_patterns - ✅
    Policy: max_qps - ✅
    Policy: custom_account_login_url - ✅
    Policy: starting_urls - ✅


@github-actions

Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.export_to_security_command_center.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner findings are not being exported to Security Command Center.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set export_to_security_command_center to ENABLED.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.blacklist_patterns.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config does not exclude sensitive URL patterns.', 'Non-Compliant Resources: nc', 'Potential Remedies: Add blacklist_patterns for sensitive paths such as admin, logout, delete, payment, or account pages.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.max_qps.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config has max_qps higher than the approved security limit.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set max_qps to 15 or lower.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.custom_account_login_url.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Custom account authentication is using an insecure login URL.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use an HTTPS login_url inside authentication.custom_account.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.starting_urls.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config is using insecure HTTP starting URLs.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use HTTPS URLs in starting_urls.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed


Summary of policy checks:
Service: cloud_security_scanner
  Resource: google_security_scanner_scan_config
    Policy: export_to_security_command_center - ✅
    Policy: blacklist_patterns - ✅
    Policy: max_qps - ✅
    Policy: custom_account_login_url - ✅
    Policy: starting_urls - ✅


Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing security impact and rationale

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing security impact and rationale

@Sundi202 Sundi202 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Resolve all comments

@github-actions

Copy link
Copy Markdown

🔍 Policy Check Results

Status: ✅ All checks passed

Test Output

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.export_to_security_command_center.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner findings are not being exported to Security Command Center.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set export_to_security_command_center to ENABLED.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.blacklist_patterns.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config does not exclude sensitive URL patterns.', 'Non-Compliant Resources: nc', 'Potential Remedies: Add blacklist_patterns for sensitive paths such as admin, logout, delete, payment, or account pages.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.max_qps.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config has max_qps higher than the approved security limit.', 'Non-Compliant Resources: nc', 'Potential Remedies: Set max_qps to 15 or lower.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.custom_account_login_url.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Custom account authentication is using an insecure login URL.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use an HTTPS login_url inside authentication.custom_account.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed

OPA check: data.terraform.gcp.security.cloud_security_scanner.google_security_scanner_scan_config.starting_urls.message
Total Google Security Scanner Scan Config detected: 2 
['Situation 1: Security scanner scan config is using insecure HTTP starting URLs.', 'Non-Compliant Resources: nc', 'Potential Remedies: Use HTTPS URLs in starting_urls.']
Unique resource names in plan (google_security_scanner_scan_config): 2
Names mentioned in output: 1
 Missing mentions: c
Only compliant resources are unmentioned; ignoring
Check passed


Summary of policy checks:
Service: cloud_security_scanner
  Resource: google_security_scanner_scan_config
    Policy: export_to_security_command_center - ✅
    Policy: blacklist_patterns - ✅
    Policy: max_qps - ✅
    Policy: custom_account_login_url - ✅
    Policy: starting_urls - ✅


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants