Skip to content

Commit d79d64d

Browse files
Merge pull request #19 from CrowdStrike/sbaliyambra/PRODSEC-103176-address-tflint-vulnerability
fix oci tflint vulnerability:PRODSEC-103176
2 parents a1f7e1b + f372900 commit d79d64d

3 files changed

Lines changed: 22 additions & 4 deletions

File tree

.github/workflows/pre-commit.yml

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,26 @@ jobs:
2323
2424
- name: Install TFLint
2525
run: |
26-
curl -s https://raw.githubusercontent.com/terraform-linters/tflint/master/install_linux.sh | bash
27-
tflint --version
26+
# Get latest version number
27+
TFLINT_VERSION=$(curl -s https://api.github.com/repos/terraform-linters/tflint/releases/latest | grep '"tag_name":' | sed -E 's/.*"([^"]+)".*/\1/')
28+
echo "Installing TFLint version: ${TFLINT_VERSION}"
29+
30+
# Download TFLint
31+
curl -s -L -o tflint.zip "https://github.com/terraform-linters/tflint/releases/download/${TFLINT_VERSION}/tflint_linux_amd64.zip"
32+
33+
# Get and verify checksum
34+
EXPECTED_SHA=$(curl -s -L "https://github.com/terraform-linters/tflint/releases/download/${TFLINT_VERSION}/checksums.txt" | grep "tflint_linux_amd64.zip" | awk '{print $1}')
35+
36+
# Verify checksum
37+
if echo "${EXPECTED_SHA} tflint.zip" | sha256sum -c; then
38+
echo "Hash verification successful - proceeding with installation"
39+
unzip tflint.zip
40+
sudo mv tflint /usr/local/bin/
41+
tflint --version
42+
else
43+
echo "Hash verification failed - script not executed"
44+
exit 1
45+
fi
2846
2947
- name: Setup Terraform
3048
uses: hashicorp/setup-terraform@v2

templates/Resource_Manager_Template/modules/iom/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ output "user_ocid" {
44
}
55

66
output "template_version" {
7-
value = "v0.3.9"
7+
value = "v0.3.10"
88
description = "The version of CrowdStrike's OCI integration supported by this template"
99
}

templates/Resource_Manager_Template/outputs.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ output "user_ocid" {
44
}
55

66
output "template_version" {
7-
value = "v0.3.9"
7+
value = "v0.3.10"
88
description = "The version of CrowdStrike's OCI integration supported by this template."
99
}
1010

0 commit comments

Comments
 (0)