Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add tfsec (v1.28.1) on all platforms #459

Merged
merged 2 commits into from
Jan 9, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions provisioning/tools-versions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ openssh_authorized_keys_url: "https://raw.githubusercontent.com/jenkins-infra/aw
packer_version: "1.8.4"
ruby_version: "2.6.10"
terraform_version: "1.1.9"
tfsec_version: "1.28.1"
updatecli_version: "0.40.2"
vagrant_version: "2.3.4"
windows_pwsh_version: "7.3.1"
Expand Down
10 changes: 10 additions & 0 deletions provisioning/ubuntu-provision.sh
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,14 @@ function install_goss() {
chmod +rx /usr/local/bin/goss
}

function install_tfsec() {
apt-get update --quiet
apt-get install --yes --no-install-recommends curl # Should already be there but this function should be autonomous

curl --silent --location --show-error "https://github.com/aquasecurity/tfsec/releases/download/v${TFSEC_VERSION}/tfsec-linux-${ARCHITECTURE}" --output /usr/local/bin/tfsec
chmod +rx /usr/local/bin/tfsec
}

## Ensure that the VM is cleaned up
function cleanup() {
export HISTSIZE=0
Expand Down Expand Up @@ -569,6 +577,7 @@ function sanity_check() {
&& python3 --version \
&& ruby -v \
&& terraform -v \
&& tfsec --version \
&& unzip -v \
&& updatecli version \
&& vagrant -v \
Expand Down Expand Up @@ -613,6 +622,7 @@ function main() {
install_terraform
install_kubectl
install_goss
install_tfsec
cleanup
}

Expand Down
8 changes: 8 additions & 0 deletions provisioning/windows-provision.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -296,6 +296,14 @@ $downloads = [ordered]@{
& kubectl.exe version --client;
}
};
'tfsec' = @{
'url' = 'https://github.com/aquasecurity/tfsec/releases/download/v{0}/tfsec-windows-amd64.exe' -f $env:TFSEC_VERSION;

'local' = "$baseDir\tfsec.exe"
'sanityCheck'= {
& tfsec.exe --version;
}
};
'chocolatey-and-packages' = @{
'url' = 'https://github.com/chocolatey/choco/releases/download/{0}/chocolatey.{0}.nupkg' -f $env:CHOCOLATEY_VERSION;
'local' = "$baseDir\chocolatey.zip";
Expand Down