-
Notifications
You must be signed in to change notification settings - Fork 65
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
Conversation
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.
cf83da3
to
aea502e
Compare
There was a problem hiding this 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 🎓
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.