-
Notifications
You must be signed in to change notification settings - Fork 157
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
shellcheck workflow + fixes #812
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add a workflow to check the correctness of shell scripts shipped with and used by libfido2. for details, see https://www.shellcheck.net/.
'! cmd' with 'set -e' inhibits errexit on both success and failure. spotted by shellcheck; see https://www.shellcheck.net/wiki/SC2251 for details.
return 1 if fido2-cred(1) fails in verify_cred()
double-quote a few variables and drop two x-prefix comparisons; no functional change; see https://www.shellcheck.net/wiki/SC2086 and https://www.shellcheck.net/wiki/SC2268 for details.
enrollment of a resident credential implies UV, therefore 'verify_cred -v' should succeed. this bug was hidden by misuse of '! verify_cred', addressed in an earlier commit.
add fido2-cred -V tests covering -hv (hmac-secret with UV)
these relate to the following categories: SC2028, SC2034, SC2046, SC2059, SC2086, SC2116, SC2162, SC2166, SC2181, SC2308, and SC3037. untested. this script appears unmaintained.
suppress https://www.shellcheck.net/wiki/SC2016; shellcheck doesn't understand that $2 is being expanded by awk
declare PKG_CONFIG_PATH and export separately to avoid masking return values; suggested by shellcheck
LDVG
reviewed
Jun 17, 2024
allow files matching a regex to be skipped (or webauthn.h will always fail, since it is vendored), and use a safer construction when looping over header files. while here, adjust the output to be slightly more useful.
shellcheck doesn't have enough context to determine where (specifically, under which shell) the command is being invoked
martelletto
force-pushed
the
shellcheck-ci
branch
from
June 17, 2024 16:49
74c6ae5
to
0988ac8
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
add a shellcheck workflow and implement required fixes. while here, add a couple more tests to
tools/test.sh
.