Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop' into claudio/rule-license
Browse files Browse the repository at this point in the history
  • Loading branch information
p4p3r committed Dec 13, 2024
2 parents b31d33e + 0f5a85c commit ae66de7
Show file tree
Hide file tree
Showing 4 changed files with 27 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v2
- uses: actions/setup-python@v5
with:
python-version: '3.7'
python-version: '3.10'
- uses: pre-commit/action@v2.0.0
env:
SKIP: yamlfmt
2 changes: 1 addition & 1 deletion javascript/aws-lambda/security/tainted-sql-string.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ rules:
- vuln
likelihood: LOW
impact: MEDIUM
confidence: MEDIUM
confidence: LOW
languages:
- javascript
- typescript
Expand Down
16 changes: 14 additions & 2 deletions terraform/gcp/security/gcp-sql-database-require-ssl.tf
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
# fail
# ruleid: gcp-sql-database-require-ssl
resource "google_sql_database_instance" "fail" {
database_version = "MYSQL_8_0"
Expand All @@ -18,4 +17,17 @@ resource "google_sql_database_instance" "success" {
ipv4_enabled = true
require_ssl = true
}
}
}

# ok: gcp-sql-database-require-ssl
resource "google_sql_database_instance" "main" {
name = "some-example-name"
database_version = "POSTGRES_15"
region = "europe-west3"
settings {
tier = "db-f1-micro"
ip_configuration {
ssl_mode = "TRUSTED_CLIENT_CERTIFICATE_REQUIRED"
}
}
}
10 changes: 10 additions & 0 deletions terraform/gcp/security/gcp-sql-database-require-ssl.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,16 @@ rules:
}
...
}
- pattern-not-inside: |
resource "google_sql_database_instance" "..." {
...
ip_configuration {
...
ssl_mode = ...
...
}
...
}
message: >-
Ensure all Cloud SQL database instance requires all incoming connections to use SSL
metadata:
Expand Down

0 comments on commit ae66de7

Please sign in to comment.