chainguard-dev / chainguard-dev/tw

help-check does not see failures

Open
#281 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Go
Stars
2
Forks
36
Avg merge
4h 36m
Merged PRs (30d)
6

Description

help-check seems to try to hard to let things succeed.
If a program exits 1 (which is very common) then help-check will call it good.

$ apk info -v | grep help-check
help-check-0.0.37-r1

$ cat /usr/bin/bad-dude 
#!/bin/sh
echo FAIL FATAL BAD
exit 1

$ ls -l /usr/bin/bad-dude 
-rwxr-xr-x 1 root root 37 Jan 27 15:23 /usr/bin/bad-dude

$ bad-dude  ; echo $?
FAIL FATAL BAD
1

$ help-check --bins=/usr/bin/bad-dude 
INFO[help-check]: Starting help checks for: /usr/bin/bad-dude
INFO[help-check]: Help flag: auto
PASS[help-check]: '/usr/bin/bad-dude' help check
INFO[help-check]: tested 1 binaries. 1 passes. 0 fails.

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue with the shown /usr/bin/bad-dude script and help-check --bins=/usr/bin/bad-dude. Then trace help-check's handling of the tested command's exit status; done means a binary exiting 1 is reported as a failed help check rather than a pass.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.