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

shellcheck workflow + fixes #812

Merged
merged 13 commits into from
Jun 18, 2024
Merged

shellcheck workflow + fixes #812

merged 13 commits into from
Jun 18, 2024

Conversation

martelletto
Copy link
Contributor

add a shellcheck workflow and implement required fixes. while here, add a couple more tests to tools/test.sh.

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
tools/include_check.sh Outdated Show resolved Hide resolved
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
@LDVG LDVG merged commit 03c18d3 into Yubico:main Jun 18, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants