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: Workaround missing tfsec release assets #55

Merged
merged 1 commit into from
Mar 24, 2022

Conversation

aidy
Copy link
Contributor

@aidy aidy commented Mar 23, 2022

If a tfsec release exists, but has no assets, this workflow breaks if
it's set/defaults to latest.

https://github.com/aquasecurity/tfsec/issues/1618

Workaround by using the most recent version that has a correctly
matching asset.

@CLAassistant
Copy link

CLAassistant commented Mar 23, 2022

CLA assistant check
All committers have signed the CLA.

entrypoint.sh Outdated
fi

wget -O - -q "$(wget -q https://api.github.com/repos/aquasecurity/tfsec/releases/${TFSEC_VERSION} -O - | grep -o -E "https://.+?tfsec-linux-amd64" | head -n1)" > tfsec-linux-amd64
wget -O - -q "$(wget -q https://api.github.com/repos/aquasecurity/tfsec/releases/${TFSEC_VERSION} -O - | grep -o -E "https://.+?tfsec_checksums.txt" | head -n1)" > tfsec.checksums
wget -O - -q "$(wget -q https://api.github.com/repos/aquasecurity/tfsec/releases -O - | grep -m 1 -o -E "https://.+?tfsec-linux-amd64" | head -n1)" > tfsec-linux-amd64
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see how this will work when the user specifies a specific version of tfsec to use.

Copy link
Contributor Author

@aidy aidy Mar 23, 2022

Choose a reason for hiding this comment

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

Oh, yeah - I meant to just drop the /, not the whole thing.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed - sorry!

If a tfsec release exists, but has no assets, this workflow breaks if
it's set/defaults to latest.

https://github.com/aquasecurity/tfsec/issues/1618

Workaround by using the most recent version that has a correctly
matching asset.
Copy link
Contributor

@owenrumney owenrumney left a comment

Choose a reason for hiding this comment

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

I like this - I learned something new in the process 🎓

@owenrumney owenrumney merged commit 36c4a0c into aquasecurity:main Mar 24, 2022
@owenrumney owenrumney changed the title Workaround missing tfsec release assets feat: Workaround missing tfsec release assets Mar 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants